Ok I have this code to (try to) pull some info out of a table depending on the value in my current form. I am just using the message box as a quick way to display my results for the moment.
varx = DLookup("[Folder Location]", "[TABLE - WR & WBS Codes]", "Criteria = '" & Forms![ZZZZZ test form]![WR Number] & "'")
MsgBox varx
The form is called: ZZZZZ test form
The field I am using on this form to set the value to look up is: WR Number
The table I want to pull the info from is: TABLE - WR & WBS Codes
The field I want to pull from the table is: Folder Location
Where have I gone wrong in my syntax as I constantly get a 2001 error
varx = DLookup("[Folder Location]", "[TABLE - WR & WBS Codes]", "Criteria = '" & Forms![ZZZZZ test form]![WR Number] & "'")
MsgBox varx
The form is called: ZZZZZ test form
The field I am using on this form to set the value to look up is: WR Number
The table I want to pull the info from is: TABLE - WR & WBS Codes
The field I want to pull from the table is: Folder Location
Where have I gone wrong in my syntax as I constantly get a 2001 error
Last edited: