Dual criteria

J

JoeBo

I am having problems with specifying criteria for findfirst where you need
to couple criteria of differing types. The following looks for a string
criteria “Ccourse†(which is declared as string) and also looks for
distributorid which is equal to pdistID (which is an integer). No error is
produced, the query acts as though the record does not exit, which it does.
Anyone help with correcting the criteria.

Any help appreciated
 
J

JoeBo

I meant to include the dcount function. I have attempted various different
syntax but with no luck.

If DCount("*", "[attendees]", "[distributor] = '" & [Ccourse] & "'" & " And
[distributorID] = " & [Pdist]) = 0 Then

Your assistance is appreciated
 
D

Douglas J. Steele

So are you using the exact same syntax in your FindFirst criteria?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



JoeBo said:
I meant to include the dcount function. I have attempted various different
syntax but with no luck.

If DCount("*", "[attendees]", "[distributor] = '" & [Ccourse] & "'" & " And
[distributorID] = " & [Pdist]) = 0 Then

Your assistance is appreciated
Douglas J. Steele said:
How are you specifying the criteria?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



error
is
 
Top