Error 2465

cyd44

Registered User.
Local time
Today, 05:25
Joined
Oct 30, 2011
Messages
85
I am trying to test for a duplicate value entered on a form and have the following code:-

Code:
If IsNull(DLookup([ID], [Patient_Detail], [Web_UID] & "='" & Me.Web_UID & "'")) Then
Tester = True
Else
GoTo DupErr
End If

When I run the form I get the 2465 error and yet the values of ID, Web_UID and Me,Web_UID can be seen in debug mode. The Dlookup is clearly working but why is it creating an error?
 
*All* of the arguments of the Domain functions are strings.
 
Thanks Rural

I changed the square brackets to "" and it worked.......Thanks for that
 
Try:
If IsNull(DLookup("[ID]", "[Patient_Detail]", "[Web_UID] ='" & Me.Web_UID & "'")) Then
 

Users who are viewing this thread

Back
Top Bottom