Dlookup does not work

Moses76

Registered User.
Local time
Today, 19:56
Joined
May 25, 2011
Messages
49
Private Sub Combo4_BeforeUpdate(Cancel As Integer)
Text6.Value= DLookup("[last]", "Table1", "First ='& forms!Table1!combo4'")
End Sub

Any ideas about this ?

mehul
 
Last edited:
This is exactly what I looked at and it kept erroring on me.
 
Your syntax does not match theirs. Copy theirs and then change the various names and see how it goes. If you still don't get it, post that effort here.
 
Worked . I most certainly had the syntax wrong there.

Moses .
 
Glad it worked for you. By the way, it seems odd to look up a last name based on a first name, if that's what you're doing. The chance of duplicate first names is pretty high, generally speaking.
 
Good Point . Did not think of that at all . How can I avoid that trap ?
 

Users who are viewing this thread

Back
Top Bottom