Query Date Issue

phillbaker

Registered User.
Local time
Today, 21:14
Joined
Jun 29, 2008
Messages
45
i have a form which has to controls on it lets call them control A and Control B.

If i put a date in Control A and one in Control B and then hit the button to open the report its not filtering out between the dates selected. Its showing dates previous to that.

In the query that the reports running from i have put in the criteria for the date payment made.

Between [Forms]![Clients]![reports_subform]![cboStartDate] And [Forms]![Clients]![reports_subform]![cboEndDate]

so as an example i might put in 01/07/2008 as the start date and the end date as 29/07/2008 but its showing in the report results from 01/05/2008.

Is there a problem with my query or what is going on.
 
You need to format in US date format.

Between Format([Forms]![Clients]![reports_subform]![cboStartDate],"mm/dd/yyyy") And Format([Forms]![Clients]![reports_subform]![cboEndDate],"mm/dd/yyyy")
 
i have tried your format below but the problem is if i select the start date as say 1st july and end date as end of july im still getting results for may and june.


You need to format in US date format.

Between Format([Forms]![Clients]![reports_subform]![cboStartDate],"mm/dd/yyyy") And Format([Forms]![Clients]![reports_subform]![cboEndDate],"mm/dd/yyyy")
 
Im no expert in access, but try this:
>=[Forms]![Clients]![ReportSubForm]![cboStartDate] AND <=[Forms]![Clients]![ReportSubForm]![cboEndDate]

I use this to pull reports when i need for instance jan 1, 2008 through mar 31, 2008. Thanks to one of the members here it has made my life much easier! Hope it helps.
 
You haven't referenced the Form/subform correctly, use the code builder to get the correct reference and check the Windows Regional settings for dates
 

Users who are viewing this thread

Back
Top Bottom