Can't get report to work right

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)
 
R

Rick Brandt

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#"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top