DLookUp isssue (1 Viewer)

bmhuettinger

Registered User.
Local time
Yesterday, 16:27
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
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 16:27
Joined
Aug 30, 2003
Messages
36,124
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.
 

bmhuettinger

Registered User.
Local time
Yesterday, 16:27
Joined
Jul 28, 2017
Messages
59
Thanks! I'll try this out in the AM!
 

Mark_

Longboard on the internet
Local time
Yesterday, 16:27
Joined
Sep 12, 2017
Messages
2,111
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

Top Bottom