Help With DLookup With Multiple Criterial

CharlesWhiteman

Registered User.
Local time
Today, 15:41
Joined
Feb 26, 2007
Messages
421
Hi all, I'm getting a type mismatch error on the following DLookup syntax.

Code:
strMonthlyTransferLimit = DLookup("Value", "radreply", "UserName =" & Me.txtUserName And "[Attribute] =" & "Monthly-Transfer-Limit")

Any ideas?

Thanks
 
Try this!
StrMonthlyTransferLimit = DLookup("[Value]","radreply","[UserName]=""" &
[Forms]![FormName]![txtUserName] & """" & "And [Attribute]=" &
[Forms]![FormName]![Monthly-Transfer-Limit])

I think the Attribute field is a numeric.
 

Users who are viewing this thread

Back
Top Bottom