This should be an easy one...

David James

New member
Local time
Today, 02:36
Joined
Jan 4, 2012
Messages
4
I have a field on my report that looks like this:

=DCount("[100%]","[MAIN_TABLE]","[100%] Between #12/01/2011# And #12/31/2012#")

I have tried to write it like this:

=DCount("[100%]","[MAIN_TABLE]","[100%] Between #12/01/[Enter four digit year]# And #12/31/[Enter four digit year]#")

with the intent of having a popup say "Enter four digit year" but I don't know the proper way to get it to work. Any help would be appreciated. I don't want to have to do a query or anything since this is such a small piece of my report.
 
The parameter prompts you are trying to use only work in a query.

I would use a form.

I avoid parameter prompts even in queries. I find it best to use a form to collect the values. This allow you to create a much better UI and do data validation.
 
If yo use a form it would look like this:

Code:
=DCount("[100%]","[MAIN_TABLE]","[100%] Between #12/01/" & Forms!MyFormName.txtMyControlName  "# And #12/31/" & Forms!MyFormName.txtMyControlName  "#")
 

Users who are viewing this thread

Back
Top Bottom