DCount problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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!
 
Βάππας

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] & '*'")
 
Back
Top