G
gmazza via AccessMonster.com
I have a Parameter form that when you enter a DateFrom and DateTo, press the
Report button, the data showing up should be between the dates entered on the
parameter form.
Incorrect data is showing up and I don't know why.
Here is the criteria on the date field in the query that the Report is
getting the dates from:
The format for the dates on the parameter form are: yyyy-mm-dd
I should mention I have 4 buttons on the parameter form so entry is easy for
the user, that being Today, Week, Month, and Year. When any button is clicked,
the appropriate date shows up and the user can modify it if they choose.
I have data from April 15-April 22. When I click the Today button, the
DateFrom shows 2009-04-23 and so does the DateTo. When I run the report it
shows ZERO records, which is correct.
When I click the Week button, the DateFrom shows 2009-04-20 and DateTo shows
2009-04-24.
All records are showing up, even the ones with dates of April 15.
The dates in the table are being stored as text fields as I am using a GMT
time that gets all the dates from this function:
TimeAndDate = Format(GetCurrentGMTDate(), "yyyy-mm-dd hh:mm:ss AMPM")
So I assume I need to convert these fields first from Text to Dates?
Just not sure how exactly.
Your help is appreciated, thanks!
Report button, the data showing up should be between the dates entered on the
parameter form.
Incorrect data is showing up and I don't know why.
Here is the criteria on the date field in the query that the Report is
getting the dates from:
=[forms]![frmErrorLogDateParam]![txtDateFrom] And <=[forms]![frmErrorLogDateParam]![txtDateTo]
The format for the dates on the parameter form are: yyyy-mm-dd
I should mention I have 4 buttons on the parameter form so entry is easy for
the user, that being Today, Week, Month, and Year. When any button is clicked,
the appropriate date shows up and the user can modify it if they choose.
I have data from April 15-April 22. When I click the Today button, the
DateFrom shows 2009-04-23 and so does the DateTo. When I run the report it
shows ZERO records, which is correct.
When I click the Week button, the DateFrom shows 2009-04-20 and DateTo shows
2009-04-24.
All records are showing up, even the ones with dates of April 15.
The dates in the table are being stored as text fields as I am using a GMT
time that gets all the dates from this function:
TimeAndDate = Format(GetCurrentGMTDate(), "yyyy-mm-dd hh:mm:ss AMPM")
So I assume I need to convert these fields first from Text to Dates?
Just not sure how exactly.
Your help is appreciated, thanks!