Senin, 24 Oktober 2011

Re: [MS_AccessPros] DLookup throwing a datatype mismatched

 

That was it. Thank you.

With warm regards,

Arthur Lorenzini| SQL Server/Access Developer l alorenzin@live.com
Office: 605-338-0947| Mobile: 605-857-9137 | Fax: 605-338-0947
 
1316 E. 7th Street
Sioux Falls, SD  57103  
SQL Server Development
Database Adminstration Services
Microsoft Access Development  
Grant Writing TA Services
IT Assessment Services
Software Application Training

________________________________
From: John Viescas <john@viescas.com>
To: MS_Access_Professionals@yahoogroups.com
Sent: Friday, October 21, 2011 1:48 PM
Subject: RE: [MS_AccessPros] DLookup throwing a datatype mismatched

 
Art-

If EmployeeID and glngThisEmpID are integers, then why did you put quotes around
the filter argument? Try this:

gstrEmployeeName = DLookup("[Employee Name]", "[qryEmployeeExtended]",
"[EmployeeID]=" & glngThisEmpID)

John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)

-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Art
Sent: Friday, October 21, 2011 7:30 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] DLookup throwing a datatype mismatched

I have the following code:

gstrEmployeeName = DLookup("[Employee Name]", "[qryEmployeeExtended]",
"[EmployeeID]='" & glngThisEmpID & "'")

Of course gstrEmployeenameis a string

glngThisEmpID is an integer

But when I run it I am getting a datatype mismatch. Any ideas?

Thanks

Art Lorenzini
Sioux Falls, SD

------------------------------------

Yahoo! Groups Links

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Tidak ada komentar:

Posting Komentar