I have a text box in a report header. I want to display the result of a function, ecount by allen browne, in the text box. I have it working on several reports, but for some reason I'm getting various error messages in this one.
The arguments for ECount are:
CODE
Public Function ECount(Expr As String, Domain As String, Optional Criteria As String, Optional bCountDistinct As Boolean) As Variant
I'm trying to display the number of unique studentids in the query 'qrysrptEmplDuring_SSR'. I've tried the following two setups, but while they work perfectly in the
immediate window they generate the following errors when i try to use them in the textbox.
'invalid syntax: you may have entered a comma without a preceding value or identifier
=ECount("StudentID","qrysrptEmplDuring_SSR",,True)
i'm guessing the error is because of the back to back commas? so i tried it by just telling the code what bCountDistinct I wanted:
'error: you may have entered an operand without an operator
=ECount("StudentID","qrysrptEmplDuring_SSR",bcountdistinct:=True)
Grr. I've tried web searching, but so far with no luck. Any idea what is going wrong?
Thanks!