Multiple Fields in a FOrm

S

SD DIamond

How do I get several fields in a FORM to automatically
pull up the correct data based on an entry I make in one
field. i.e. I enter a product ID and the descriptive
fields of cut, color, clarity etc. . .fill from that
record in the Products table?
 
G

grep

You could use dlookups in the AfterUpdate event to set the values for
the other fields.

Cut = dlookup("Cut", "Products", "[ProductID] = " & ProductID)
Color = dlookup ("Color", "Products", "[ProductID] = " & ProductID)
Clarity = dlookup ("Clarity", "Products", "[ProductID] = " & ProductID)

I'm not sure it's the most efficient way to handle it, but it work.

grep
 
S

SD Diamonds

Thank You I will try that!
-----Original Message-----
You could use dlookups in the AfterUpdate event to set the values for
the other fields.

Cut = dlookup("Cut", "Products", "[ProductID] = " & ProductID)
Color = dlookup ("Color", "Products", "[ProductID] = " & ProductID)
Clarity = dlookup ("Clarity", "Products", "[ProductID] = " & ProductID)

I'm not sure it's the most efficient way to handle it, but it work.

grep

SD said:
How do I get several fields in a FORM to automatically
pull up the correct data based on an entry I make in one
field. i.e. I enter a product ID and the descriptive
fields of cut, color, clarity etc. . .fill from that
record in the Products table?
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top