Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dlookup problems

Status
Not open for further replies.

EFS

Technical User
Jun 8, 2001
16
0
0
US
Further to a previous post, I am having problems getting a Dlookup function to work.
Table: "Item master list" contains Part numbers with descriptions
Form: "Data Input form" used to input production Data and is based on table "Products"
Concept: When a "Part number" is entered onto the form (into field "Scan Material"), Dlookup function is used to go to "Item master list" and return the description field for that part number to the form.
This is what I have, but it returns a Null.

=DLookUp("[item description]","Item master list","[Part Number]='[Forms]![Data Input form]![Scan Material]'")

Any help greatly appreciated!
Thanks for the Lead off Bastien!
 
try this instead

=DLookUp("[item description]","Item master list","[Part Number]= " & Str([Forms]![Data Input form]![Scan Material]))

you do not need the single quotes around [Forms]![Data Input]![Scan Material] and when you add the double quotes around that statement it looks for that as a value in the part field and not the actual part number.

HTH Dave
ToeShot@Hotmail.com
Today Is Tomorrows Yesterday. So Why Wait
 
Many thanks, Now it all becomes very clear.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top