Can't get report to work right

  • Thread starter Thread starter Ryan Card
  • Start date Start date
R

Ryan Card

Hi, I am trying to design a report to show the daily purchases made daily.
When I go through my report it shows all of the purchases made from the
start of the program. I tried to use the date range protocal but it will not
do anything to it. Am I missing something?
Thank so much for any replies
(e-mail address removed)
 
Ryan Card said:
Hi, I am trying to design a report to show the daily purchases made daily.
When I go through my report it shows all of the purchases made from the
start of the program. I tried to use the date range protocal but it will not
do anything to it. Am I missing something?
Thank so much for any replies
(e-mail address removed)

What exactly is the "...date range protocol..."?

You either need to base the report on a query that uses criteria to display the
date you want or open the report from code where you can apply a filter using
the WHERE clause of the OpenReport method. An example of that would be...

DoCmd.OpenReport "ReportName",,,"[SomeDateField] = #11/28/2003#"

Either method can be complicated if the DateTime fields in the base data also
includes Time other than midnight. Then you need to either strip the time
portion out when applying your criteria or else use a range.

DoCmd.OpenReport "ReportName",,,"[SomeDateField] >= #11/28/2003# AND
[SomeDateField] < #11/29/2003#"
 
Back
Top