Date ranges while using DCount

jadefury

Registered User.
Local time
Yesterday, 23:12
Joined
Jan 4, 2010
Messages
21
I am currently using this on the report which is attached to my query:

=DCount("[Patient Type:]","metroQ","[Patient Type:]='Level 1 Care Coordination'")

and this is working correctly. However if I add this to my query so that you can manually enter the date for the report I get #error on the report.

Between [Enter Date 1] And [Enter Date 2]

The Query works fine as a stand alone and the Report works as a stand alone. I guess my question is is there something I can add just to the Dcount expression that acts like the above query where the dates can be manually entered each time the report is ran?

Thanks in advance!

 
Use a FORM for input and then you can refer to the form text boxes (as long as the form remains open) at any time and in both the queries and the dcount.
 
Try this (I assume here that your date field is named fldDate
Code:
[FONT=Times New Roman][SIZE=3]=DCount("[Patient  Type:]","metroQ","([Patient Type:]='Level 1 Care Coordination')  AND ([fldDate] BETWEEN #" & InputBox("Enter Date 1") & "# AND #" & InputBox("Enter Date 2") & "#)")[/SIZE][/FONT]
 

Users who are viewing this thread

Back
Top Bottom