Art,
Do you need to delimit it with quote marks?
glngThisEmpID = DLookup("[EmployeeID]", "tblSecurity", _
"[UserID] = '" & gstrThisUser & "'")
Liz Ravenwood
Database Developer / Programmer
Super First Class Products
B/E Aerospace
O: 1.520.239.4808
www.beaerospace.com
-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Art
Sent: Friday, September 23, 2011 7:46 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Dlookup error
I have the following code:
gstrThisUser = Me.txtUser
glngThisEmpID = DLookup("[EmployeeID]", "tblSecurity", _
"[UserID] = " & gstrThisUser)
The issue is this is erroring with the following message:
Run-time error 2471
The expression yu entered as a query parameter produced this error: 'svogel'
I am trying to return the employeeid based on the lookup:
UserID is a string
gstrThisUser is a string
What am I doing wrong?
Thank you
Art Lorenzini
Sioux Falls, Sd
------------------------------------
Yahoo! Groups Links
This email (and all attachments) is for the sole use of the intended recipient(s) and may contain privileged and/or proprietary information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
Jumat, 23 September 2011
RE: [MS_AccessPros] Dlookup error
__._,_.___
MARKETPLACE
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar