S
Steven Sutton
I have a report which is based on a query. The query is this:
SELECT DISTINCT tblJobTickets.JobNumber, tblJobTickets.JobName,
tblJobTickets.intJobID, Max(tblJobTickets.TicketDate) AS MaxOfTicketDate,
Max(tblJobs.intQuantity) AS MaxOfintQuantity
FROM tblJobTickets INNER JOIN tblJobs ON tblJobTickets.intJobID =
tblJobs.intJobID
GROUP BY tblJobTickets.JobNumber, tblJobTickets.JobName,
tblJobTickets.intJobID
What I would like to do is to limit the Report to a particular range of
dates upon opening. Specifically, the TicketDate field. When I changed the
query to be Between certain dates I got an SQL statement that added the
following line:
HAVING (((Max(tblJobTickets.TicketDate)) Between #1/1/2008# And #1/31/2008#));
The Query worked fine but I need to set the dates when the report is opened.
If it is possible to restrict the Report's range of records retrieved by
using a DoCmd and a Where clause I haven't figured out the correct Where
clause yet. Can someone tell me how to restrict the records retrieved by the
Report?
Thanks in advance!
SELECT DISTINCT tblJobTickets.JobNumber, tblJobTickets.JobName,
tblJobTickets.intJobID, Max(tblJobTickets.TicketDate) AS MaxOfTicketDate,
Max(tblJobs.intQuantity) AS MaxOfintQuantity
FROM tblJobTickets INNER JOIN tblJobs ON tblJobTickets.intJobID =
tblJobs.intJobID
GROUP BY tblJobTickets.JobNumber, tblJobTickets.JobName,
tblJobTickets.intJobID
What I would like to do is to limit the Report to a particular range of
dates upon opening. Specifically, the TicketDate field. When I changed the
query to be Between certain dates I got an SQL statement that added the
following line:
HAVING (((Max(tblJobTickets.TicketDate)) Between #1/1/2008# And #1/31/2008#));
The Query worked fine but I need to set the dates when the report is opened.
If it is possible to restrict the Report's range of records retrieved by
using a DoCmd and a Where clause I haven't figured out the correct Where
clause yet. Can someone tell me how to restrict the records retrieved by the
Report?
Thanks in advance!