DCount problem

  • Thread starter Βάππας Κωνσταντίνος
  • Start date
Î

Βάππας Κωνσταντίνος

I use DCount function:

DCount("[InsurerID]";"ApplicationForm";'[ApplicationFormNumber]=[InsertApplicationFormNumber] & "001" ')

it will return 1 record, that's true.
But if i use

DCount("[InsurerID]";"ApplicationForm";'[ApplicationFormNumber]=[InsertApplicationFormNumber] & "*" ')

or

DCount("[InsurerID]";"ApplicationForm";'[ApplicationFormNumber]=[InsertApplicationFormNumber] & "???" ')

it will return 0. It should return 1 record again!
 
S

Steve Schapel

Βάππας

Your second and third examples will only return a record if you have
date that has * or ??? literally in the ApplicationNumber. However, if
you are trying to use as wildcards, you need to use Like keyword, not =
operator. By the way, I think it would be usual syntax to use the double
"s on the outside and single 's on the inside. So...
DCount("[InsurerID]";"ApplicationForm";"[ApplicationFormNumber] Like
[InsertApplicationFormNumber] & '*'")
 

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

Dcount -Date Criteria - Won´t find it - 0
help needed 0
dcount 1
dcount 1
Replacing DCount With SQL Statement 10
DCount Syntax 2
DCount 2
Using DCOUNT 3

Top