Dlookup Problem

G

Guest

Are there a maximum number of arguments that can be put in the Vlookup
function? I know the Dlookup function will return the first occurrence if
more then one field meets the criteria but I sure I am using the right
syntax. Here is the function the way it is in my code:

TempStr = Nz(DLookup("[ContactName]", "Contact", "[ContactType] = '" &
Me!ContactType & "'" _
& " AND [ClientNumber] = " & Forms![ModifyClient]!ClientNumber _
& " AND [Prime] = True"))

All is ok but don’t seem to take care of the last criteria [Prime] = True.
It come up with the right ContactType and ClientNumber but will return the
first occurrence that meets those 2 criterias.

Am I doing something wrong?
 
K

Ken Snell [MVP]

Assuming that Prime is a boolean data type field, your syntax looks fine.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

DLookUp Problem 2
Using Max or DMax in DLookUp criteria? 1
DLookUp Format 4
Dlookup problem in coding 2
Dlookup Help Please 8
Another DLOOKUP question 2
DLookup Syntax Error 3
DLookUp syntax 9

Top