Help with Calendar control

  • Thread starter Thread starter eacollie
  • Start date Start date
E

eacollie

I want to put a calendar control on a form, have the user
select a date, and then run a report based on that date. I
think I would collect the date in a variable in the
calendar's onUpdate code, then use this as a filter to
send to the report. Is that correct?

Thank you for any help you can give in coding!
 
-----Original Message-----
I want to put a calendar control on a form, have the user
select a date, and then run a report based on that date. I
think I would collect the date in a variable in the
calendar's onUpdate code, then use this as a filter to
send to the report. Is that correct?

Thank you for any help you can give in coding!
.

All you need to do is to get the date from the control
when the report is being run. Assuming the user must
click a button to run the report, use the code behind the
onclick event of the command button:

for example

sub Command0_onclick()
docmd openreport "This report",acpreview, "Date = " &
me.datecontrol
 
My report is based on a query. The date I want to filter
by is from the table "TRANSACTIONS" and the Field
is "TRANSACT_DATE". How do I use your code below using
this field name?

Thank you for your invaluable help!
 
Back
Top