I am trying to count records (just number) for a specific period based on VisitDate and a column named "P_GumsProphylaxis". Visit Date range I am providing from a DtFrom and DtTo placed on form F_Reports The column P_GumsProphylaxis contains "-" if there is no data.
Actually I placed one unbound text box name called "VisitCount" on F_Report form and I need to get the total records as figure in this after clicking a command button
Would it be ok if I'll use Dcount in following way:
I tried with all the 4 examples. But the output is 0 in textbox.
I tried to change from "[P_GumsProphylaxis] = '-'" to "[P_GumsProphylaxis] <> '-'" bcz we need get theose records only which contains data and not the - sign.
The dcount's (and all domain aggregate functions) criteria is a string. If you need to use a value outside of that string (on a form for instance) you need to break the string add that form field, then close the string. If the dlookup field is a string, you need to add single quotation marks to the form field.