Syntax error with DLookup

Ronaldo9

Registered User.
Local time
Today, 14:53
Joined
Jul 20, 2011
Messages
21
I would appreciate any help with this Dlookup function.

This part of a function that checks whether there is a duplicate in the table.
A duplicate record here is a record that has the following:
an already existing Card number AND (the status of the card = activated OR pending)

I have the following code, but I get a compile error: Expected: list separator or )

DLookup("CardID", "tblCards", "CardNumber = " & Me.txtCardNumber"AND ([CardStatus] = 'Activated' OR [CardStatus] = 'Pending')")

Thank you in advance,
Elias
 
You don't have an ampersand between the form reference and the rest of the string.
 
:o Can't believe I missed that..
Many Thanks
 

Users who are viewing this thread

Back
Top Bottom