J
J
I need to create a report that reports history based on a 'Date Completed'.
So I created a query off of my table that calculates 30 days less that the
'Date Completed'.
Using an [Enter Completed Date] in my query as 09/30/08 the result in my
'Date_Completed30' field is correct, indicating 08/31/08.
Now I want a report that will give me all the records between the
'Date_Completed' and the 'Date_Completed30'.
Since my initial attempts resulted in a 'circular' error, I went back to my
first query and created a field called 'Date_Completed2' which equals my
'Date_Completed'.
Now I have 3 date fields, 'Date_Completed', 'Date_Completed2', and
'Date_Completed30', and they are populating correctly.
My next attempt was to create a 2nd query to give me the records between the
'Date_Completed2' and 'Date_Completed30' fields. I've tried 'between'
statements, 'IIF' statements but for some reason the only records I end up
with are for the 'Date_Completed'. So I have the correct # of records for
those completed on 09/30/08, but can't get those that land between 09/30/08
and 08/31/08.
Here's my SQL statement:
SELECT tbl_Incident_Table_MT.Incident_IDNumb,
qry_ITIncidentHistory_1.Date_Completed,
qry_ITIncidentHistory_1.Date_Completed2,
qry_ITIncidentHistory_1.Date_Completed30
FROM tbl_Incident_Table_MT INNER JOIN qry_ITIncidentHistory_1 ON
tbl_Incident_Table_MT.Incident_IDNumb =
qry_ITIncidentHistory_1.Incident_IDNumb
WHERE (((qry_ITIncidentHistory_1.Date_Completed) Between
[qry_ITIncidentHistory_1]![Date_Completed2] And
[qry_ITIncidentHistory_1]![Date_Completed30]))
GROUP BY tbl_Incident_Table_MT.Incident_IDNumb,
qry_ITIncidentHistory_1.Date_Completed,
qry_ITIncidentHistory_1.Date_Completed2,
qry_ITIncidentHistory_1.Date_Completed30;
Any help would be appreciated.
So I created a query off of my table that calculates 30 days less that the
'Date Completed'.
Using an [Enter Completed Date] in my query as 09/30/08 the result in my
'Date_Completed30' field is correct, indicating 08/31/08.
Now I want a report that will give me all the records between the
'Date_Completed' and the 'Date_Completed30'.
Since my initial attempts resulted in a 'circular' error, I went back to my
first query and created a field called 'Date_Completed2' which equals my
'Date_Completed'.
Now I have 3 date fields, 'Date_Completed', 'Date_Completed2', and
'Date_Completed30', and they are populating correctly.
My next attempt was to create a 2nd query to give me the records between the
'Date_Completed2' and 'Date_Completed30' fields. I've tried 'between'
statements, 'IIF' statements but for some reason the only records I end up
with are for the 'Date_Completed'. So I have the correct # of records for
those completed on 09/30/08, but can't get those that land between 09/30/08
and 08/31/08.
Here's my SQL statement:
SELECT tbl_Incident_Table_MT.Incident_IDNumb,
qry_ITIncidentHistory_1.Date_Completed,
qry_ITIncidentHistory_1.Date_Completed2,
qry_ITIncidentHistory_1.Date_Completed30
FROM tbl_Incident_Table_MT INNER JOIN qry_ITIncidentHistory_1 ON
tbl_Incident_Table_MT.Incident_IDNumb =
qry_ITIncidentHistory_1.Incident_IDNumb
WHERE (((qry_ITIncidentHistory_1.Date_Completed) Between
[qry_ITIncidentHistory_1]![Date_Completed2] And
[qry_ITIncidentHistory_1]![Date_Completed30]))
GROUP BY tbl_Incident_Table_MT.Incident_IDNumb,
qry_ITIncidentHistory_1.Date_Completed,
qry_ITIncidentHistory_1.Date_Completed2,
qry_ITIncidentHistory_1.Date_Completed30;
Any help would be appreciated.