Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calender Controls to filter data 1

Status
Not open for further replies.

Ouch

Programmer
Jul 17, 2001
159
GB
i have a calender control and when a user selects a date i want a subform on the calender form to show all the records where the [RecordDate] is equal to the [selected date] off the calender control.

i seem to be going round in circles

i am using ms calender control 7
my form with my calender and subform showing all the records is unbound

please help!
 
You could bind that sub form to a sql statement or a query that referenced a hidden textbox on the calender form called txtDate. I use the date time picker, but I think this will work for the Calender control. When the user chooses a date, just have that date placed into the txtdate textbox then requery the sub form

Private Sub Calender_Change()
me.txtDate = calender.value
me.MySubForm.Form.Requery

end sub

the subform's underlying query will have this criteria in the date field FORMS![MyMainForm]![txtDate]

Every time the user changes the date on the calender control it will requery the subform.

that should work - also, you might have to format the calender's value so that it is a date and not a datetime value.

Good luck1

Bob
 
thanks for the help it worked brilliantly!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top