I have a dlookup function that works properly as follows:
Me.PNDisplay = DLookup("[Part B1]", Me.cboAssembly, "[Feeder B1] ='" _
& Forms![F_Main]!Feeder & "'")
When I try to replace the fields with variables like this:
Me.PNDisplay = DLookup("['" & strPartLookup & "']", Me.cboAssembly, "[" _
& strFeederLookup & "] = '" & Forms![F_Main]!Feeder & "'")
I get a run-time error '2001': you cancelled the previous operation
I'm sure my delimiters are incorrect, but I'm unable to find any examples of this anywhere. Any help would be greatly appreciated.