DLookup Help Needed

J

John W. Vinson/MVP

I used the lookup column in the orders table so that the user would not have
to type in the long, hard to spell chemical name. I am sure there is probably
a better way to do this. Can you point me in that direction please?

Yes. Use a lookup - a Combo Box - *ON THE FORM*, not in the table. It
is not necessary to use Microsoft's misdesigned, misleading,
infuriating Lookup Field misfeature in order to put a combo box on a
form!

Users should not be opening table datasheets at all; you have much
more control and flexibility using a form. You're right, users should
certainly not be typing 1,3,8-trimethylxanthine, although I should
probably go drink a solution shortly... but a lookup field is NOT the
best way to solve this problem.
 
J

Jody

I got the combo box in the form now. Now what I need is to figure out how to
use the combo box selection, to populate other fields in the form. DLookup is
not working (It give the #error message). The previous message has the
Dllokup formulas I am trying to use.

Thanks
 
J

John W. Vinson/MVP

I got the combo box in the form now. Now what I need is to figure out how to
use the combo box selection, to populate other fields in the form. DLookup is
not working (It give the #error message). The previous message has the
Dllokup formulas I am trying to use.

The cause of the problem is that with a Lookup field - or for that
matter a combo box! - what you see is *not* what you get. The visible
value in the combo box might be "1,4,6-trimethylxanthine" but the
actual VALUE of the combo box is 312 - the unique ID of that chemical.

I don't know just what table you're searching or how, but you need to
understand that what you see and what the computer sees may be
different. You can PROBABLY use DLookUp on the ID field (whatever that
fieldname is, I don't know) to look up the numeric field in the table.
 
M

Matthew Martin

I have a question, I am successfully pulling data from my combo box, but it the form, some of the fields are updated, but you cannot see the value. I can copy (the field has the correct value, but all you can do is highlight, not see it) and paste it somewhere else and it is visible. Can someone help me with this?

Thanks
 

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