DLookUp isssue

bmhuettinger

Registered User.
Local time
Yesterday, 19:41
Joined
Jul 28, 2017
Messages
59
I use DLookUP all the time - that's why it's particularly frustrating that I can't get this one to work.

It appears as a control in a Textbox on my form "DailyReviewForm". I want the textbox to be populated with the data from the field "MFGPart" which appears in the table "tbl_StockProgramParts". I want the lookup to be based on the (current) Form field "CustomerPO" which corresponds with the table field "POPart#"

=DLookUp([MfgPart],"tbl_StockProgramParts","[popart#]"=[Forms]![DailyReviewForm]![CustomerPO])

I've tried this many ways, many times. The field names are all spelled correctly. I don't know what else to do, though I feel it's something very silly that I'm doing wrong
 
The field name has to be in quotes. The = in the criteria has to be within the quotes. Your syntax is correct for a numeric data type, will need delimiters for text.
 
Thanks! I'll try this out in the AM!
 
Just to make sure, since the rest of your fields seem to be better named, should "popart#" be POPartNo or PO_PartNo?

By preference I avoid non-alpha numerics in names, something you look to be doing also.
 

Users who are viewing this thread

Back
Top Bottom