-
Please post your Dlookup code.
The WHERE Criteria for Dlookup can handle multiple expressions- you write them basically the same way as you would for SQL (just without the WHERE). Also, you have to wrap the evaluated criteria with the correct symbols- single quotes for string, pound signs for dates, nothing for numbers.
Example using form object value for criteria:
[vba]DLookup("EmployeeName", "tblEmployees", "EmployeeID = '" & Me.EmployeeID & "' AND HireDate = #" & Me.HireDate & "#"[/vba]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules