DLOOKUP HELP

K

kms

I WANT AN UNBOUND CONTROL BOX IN MY FORM CALLED [VENDOR NAME] TO DISPLAY THE
VENDOR NAME RELATED TO THE [VENDOR NUMBER] FIELD IN THE FORM IM WORKING IN.
THE [VENDOR#] FIELD IS TAKEN FROM MY PO TABLE. I ALSO HAVE A TABLE CALLED
VENDOR LIST THIS IS THE DLOOK-UP EXPRESSION I'M TRYING TO USE BUT IT KEEPS
GIVING ME AN ERROR MESSAGE
=DLookUp("[VENDOR NAME]","[Vendor list ]","[VENDOR NAME] =" & Forms![PO
FORM]![VENDOR #])

PLEASE HELP!!
 
L

Linq Adams via AccessMonster.com

You didn't give the error message/number you received, so this is guessing,
but
the syntax for your DLookup() is only correct ***if*** [VENDOR #] is Numeric.


IF [VENDOR #] is a Text field, it would need to be

=DLookUp("[VENDOR NAME]","[Vendor list ]","[VENDOR NAME] = '"& Forms![PO FORM]
![VENDOR #] & "'")

And please, n the future, do not post in all capital letters! This is
conidered as shouting online, is difficult to read, and many possible
responders will simply ignore your post.
 

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