calendar control selecting records in subform

capdownlondon

Registered User.
Local time
Today, 22:06
Joined
Mar 18, 2007
Messages
52
is it possible to use calendar control 11 to select records in a subform that are from the date selected (there is a field in the recordsource table with the dates for each record). so when you click on 1 date in the calendar records from that date automatically appear in the subform from that date, and another date will display records from that date.

thanks

Adam
 
sure. your subform would need to be based on a query whose criteria is bound to the calendar control then on the click of the date. you would have to do a requery of the subform...

hope this points you in the right direction
 
how do you do a requery?
 
you would do a forms!formname.subformcontainername.requery in the onclick event of the calendar control
 
i've managed to make it display by date selected, but when i change the date on the calendar it stay on the original date selected- i remember something from a while ago when i had to do something similar, and i had to use some code i think to make the subform change when i change the selection (before it was a combo box selection not a calendar, but i imagine its the same concept)???? any ideas?
 
yup the requery will allow you to refresh on every click!
 
thanks, but there is no onclick event on the calendar control? there is onEnter and onUpdated, i'll try those and let u know if any luck.

thanks
 
its the calendar control 11 thats built into access by the way if that helps
 

Users who are viewing this thread

Back
Top Bottom