My Assistant
|
|
Mar 2 2012, 06:04 PM
Post
#1
|
|
|
UtterAccess Addict Posts: 139 From: USA |
Greetings!
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! |
|
|
|
![]() |
Mar 4 2012, 02:13 AM
Post
#2
|
|
|
UtterAccess VIP Posts: 7,589 From: South coast, England |
Hi Becca
Try: =ECount("StudentID","qrysrptEmplDuring_SSR","",True) hth |
|
|
|
dancingwwaves Error Using Function In Report Text Box Mar 2 2012, 06:04 PM
briangriffey I posted something, but the more I read your post.... Mar 2 2012, 06:22 PM
pere_de_chipstick Hi Becca
Few thoughts
What event triggers the cal... Mar 3 2012, 04:43 AM
dancingwwaves Hi Pere and Brian!
Thanks for the replies... Mar 3 2012, 04:41 PM
dancingwwaves IT WORKS!! Perfect! Thank you!... Mar 4 2012, 04:54 PM
pere_de_chipstick Good luck with your project. Mar 4 2012, 05:08 PM![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 22nd May 2013 - 10:43 AM |