Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dlookup and 'and'..?

Status
Not open for further replies.

kenjoswe

Technical User
Sep 19, 2000
327
SE
Hi all,

I would like to lookup a value from a table with lookup.
How can I use dookup with two criterias?
I have tried:
intValue = DLookup("Field1", "Table1", "Field2=" & Me.Ctrl1 and "Field3='" Me.Ctrl & "'"

Is there a better way to lookup a value from table?

/Kent J.
 
intValue = DLookup("Field1", "Table1", "Field2=" & Me.Ctrl1 & " AND Field3='" Me.Ctrl & "'")

Craig
 
Try:

intValue = DLookup("Field1", "Table1", "Field2=" & Me.Ctrl1 & " AND Field3='" Me.Ctrl & "'"


The 'AND' needs to be part of the Where Clause / Condition.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top