hmm.... what is Ja/Oui? Field values from the table? Or is it supposed to be a string literal?
The way it reads right now, you're dividing Ja by Oui for what Ptag should be.
Is the form the field is on named frmPercentTestBuyIntermediate? Should Einddatum be Enddatum?
Assuming that Ja/Oui is a string literal the content in the string field Ptag must match, correcting Einddatum spelling, and that the form referenced IS the form this object is on, I'd try:
-------------------------------------------------------------------------------------------------
=DCount("Ptag","tblTestBuyBA01","Ptag = 'Ja/Oui' And Invoerdatum >= Begindatum And Invoerdatum <= Enddatum")
-------------------------------------------------------------------------------------------------
Notice that since it's a string literal I put Ja/Oui between ' marks. I built a test with these values and field names and it worked.
You may also want to code a refresh for your text box when values in BeginDatum, Invoerdatum, Enddatum or Ptag are changed.
Does this help?
|