DLookup Help

Novice1

Registered User.
Local time
Today, 05:25
Joined
Mar 9, 2004
Messages
385
I need help with my DLookup code.

I have a form with an unbound combo box (SigBlock) in which the user select sa technician's name (Rowsource: tblTechnicians; bound to TechID). I'm trying to pull a field (Line2), from tblTechnicians, into an e-mail I'm writing. I wrote ...

DLookup("[Line2]", "tblTechnicians", "TechID = Me.SigBlock")

I'm getting a runtime error 2471. The expression you entered as a query parameter produced this error: 'Me.SigBlock'

What am I doing wrong? Thanks
 
your Me.SigBlock needs to be outside the quotes

DLookup("[Line2]", "tblTechnicians", "TechID = " & Me.SigBlock)
 
That did it ... THANKS!!
 

Users who are viewing this thread

Back
Top Bottom