Look up Name in a Table

Novice1

Registered User.
Local time
Yesterday, 23:31
Joined
Mar 9, 2004
Messages
385
Help please. I have a form. When I open the form I want to check a name on a separate query. If the name exists I want to show a msgbox. I'm having a problem coding the DLookup. Any help would be appreciated.
 
Syntax for dlookup:

Code:
Dlookup("[FieldYouWantToReturn]","TableOrQueryName","[CriteriaFieldName]=Value)
 
I would suggest using a DCount instead of the DLookup. Check to see if the DCount is > 0 (this way you don't have to deal with nulls using the NZ function with the DLookup).
 

Users who are viewing this thread

Back
Top Bottom