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 on two fields

Status
Not open for further replies.

b31luv

Technical User
Feb 21, 2002
171
US
This is my code

Me.ProjectName = DLookup ("ProjectName", "[ProjectInfo]", "[ProjectInfo].ProjectNo = '" & Me.ProjectNumber & "'" And "[ProjectInfo].TaskNumber = '" & Me.TaskNumber & "'")

Everything is a text value.

I keep getting Type Mismatch

I looked at this thread 702-695680 and it suggest writting the code exactly the way I have. Can anyone help me solve this?
 
I got, I had too many double quotes.

Me.ProjectName = DLookup("ProjectName", "ProjectInfo", "ProjectNo = '" & Me.ProjectNumber & "' And TaskNumber = '" & Me.TaskNumber & "'")

Removed the double quote before the "And" and after the "AND"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top