Dlookup not working (1 Viewer)

Locopete99

Registered User.
Local time
Today, 15:29
Joined
Jul 11, 2016
Messages
163
Hi Guys,

I'm missing something here.

Can you take a look at my DLookup and see if you can spot why its erroring?

Error is Runtime 2471

Code:
DLookup("E-mail", "Tbl_User", "[login]=" & "'" & fOSUserName & "'")
 

Minty

AWF VIP
Local time
Today, 23:29
Joined
Jul 26, 2013
Messages
10,371
Your making it too complicated - assuming fOSUserName is text, and doesn't have ' in it

Code:
DLookup("[E-mail]", "Tbl_User", "[login]= '" & fOSUserName & "'")
See the links in my signature.
 

Locopete99

Registered User.
Local time
Today, 15:29
Joined
Jul 11, 2016
Messages
163
Thanks Minty
 

Users who are viewing this thread

Top Bottom