How do I lookup something from a a different table on a data entry form?

DeMarcus

Registered User.
Local time
Today, 18:44
Joined
Jul 14, 2006
Messages
37
Okay, for simplicity's sake, I have a data entry form.

It is bound to tableData.

Inputs are:

ProductID
Customer Name


ProductID is a combo box on the form.

There is another table called tableProduct. In this table, is ProductID and ProductName.

For convenience sake, when a user chooses a ProductID from the combo box, I want a separate textbox to lookup that ID from tableProduct and display the ProductName.

How can I accomplish this?

Thanks in advance.
 
Write a Dlookup to pull that when the combobox is updated
 
FoFa said:
Write a Dlookup to pull that when the combobox is updated

Can you help me in doing this?

DLookUp([ProductName],[tableProducts],[cboProductID])

That's what I came up with.. But I have no idea what to do with it. If I stick it under "Control" of the textbox, it doesn't work.. It doesn't work when I try to stick it in the VB code..
 

Users who are viewing this thread

Back
Top Bottom