Creating reports from a Calendar

E

erick-flores

OK, I am trying to create several reports from a Calendar that I
created in Access (with Calendar Control 11.0). There are two calendar:
(1)From Date and (2) To Date. What I am trying to do is click on a date
(From Date) and click on another date (To Date) and then hit a command
button to create reports that match that criteria from the Calendar.

e.g. Lets say I want the sales from May 12 2004 to June 23 2004. I will
click on the From Date calendar and put that "May 12 2004" date and
click on the other calendar, To Date, and put "June 23 2004" date. That
is the big picture.

Can somebody helps pleaseeeeee, thanks
 
S

strive4peace

Hi Erick,

use the Wherecondition parameter for the OpenReport action

DoCmd.OpenReport reportname[, view][, filtername][,
wherecondition]

DoCmd.OpenReport "Reportname", _
acViewDesign,, _
"DateFieldname >=#" & me.Date1_controlname _
& "# AND <= #" & me.Date2_controlname & "#"


Warm Regards,
Crystal
Microsoft Access MVP 2006

*
Have an awesome day ;)

remote programming and training
strive4peace2006 at yahoo.com

*
 
Top