How do I pass the date clicked on a Calendar to a parameter query.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a simple application and want to select a date from a calendar and run
a parameter query. how do i do that? Thanks
 
Your calendar named MyCalendar is on a form we will call PFrmMyCalendar. Add
a textbox named MyDate to the form and set its visible property to false.
Put the following code in the calendar's AfterUpdate event:
Me!MyDate = Me!MyCalendar.Value
Put the following expression in the criteria of the date field in your
query:
Forms!PFrmMyCalendar!MyDate
You now need to put this all together in however you have your system set up
so that you open the calendar form, select the date then run the query.
 
Back
Top