PeterWieland
Registered User.
- Local time
- Today, 15:51
- Joined
- Sep 20, 2000
- Messages
- 74
Why is Dcount so damned fussy?
I am trying to display a record count on a sub-form, using criteria from a text box on the parent form. This is what I have:
counter = DCount([ID], "qryReturnUserRecords", "[LessonNo] = Forms!frmGetInputData!txtLesson")
When I run it, I get the following error:
Run-time error '170'
Line 1: Incorrect syntax near '!'
I have checked several examples on here and the line appears to me to be formatted correctly, but I always seem to have problems with the syntax of Dcount. Can anyone enlighten me?
Thanks in advance
I am trying to display a record count on a sub-form, using criteria from a text box on the parent form. This is what I have:
counter = DCount([ID], "qryReturnUserRecords", "[LessonNo] = Forms!frmGetInputData!txtLesson")
When I run it, I get the following error:
Run-time error '170'
Line 1: Incorrect syntax near '!'
I have checked several examples on here and the line appears to me to be formatted correctly, but I always seem to have problems with the syntax of Dcount. Can anyone enlighten me?
Thanks in advance