Calendar in place of Combo Box

  • Thread starter Thread starter DHS
  • Start date Start date
D

DHS

I am Trying to Use a calendar as a control to search for data. I have a form
limited to a list of non duplicating dates from 2003 through 2010. The Date
sets the mainform and a subform indicates all occurrences on that date. As
move from record to record the calendar is updated. Thats the easy part. I
now want to use the calendar to go to a specific record equal to the
calendar date. This is what, I am having problems with. I would appreciate
any suggestions.
 
Hi DHS.

DHS said:
I am Trying to Use a calendar as a control to search for data.
I have a form limited to a list of non duplicating dates from 2003
through 2010. The Date sets the mainform and a subform indicates
all occurrences on that date. As I move from record to record the
calendar is updated. Thats the easy part.

So the recordsource of the main form consist only of dates?
I think you should use that form without a recordsource, just an unbound
calendar control.
I now want to use the calendar to go to a specific record equal to
the calendar date. This is what, I am having problems with.

Use the LinkMasterField property of the subform control to point to the
unbound calendar control.
 
Wolfgang,

Thanks, I wasn't aware that I could make that kind of Relationship. But how
can I have the subform refresh with each use of the calendar.

DHS
 
Hi DHS.

dates and ID Column
Thanks, I wasn't aware that I could make that kind of Relationship.
But how can I have the subform refresh with each use of the calendar.

Use the click event of the calendar control to requery the subform:
In the code window in the upper left combo box, select the name of
the calendar control. Then, in the right box, select the Click event.
Enter a line of code like this one:
Me.SubformControl.Requery
Delete the "Updated"-Procedure if you don't need it.
 
Back
Top