Date Control Events & Methods not working

  • Thread starter Thread starter Jim Shaw
  • Start date Start date
J

Jim Shaw

BlankI've been trying to use two of either the "Calendar" controls or the
"Microsoft Date Picker" controls to allow a user to specify the beginning
and end of a date range. Both control types don't offer an "On Click"
event, but they do offer and "On Update" and an "On Exit" event. When the
StartDate control is updated I want the date value passed into the EndDate
control. I've put a breakpoint on the On Update code, but the event never
fires. The same code in the OnExit event works, but only after the control
loses focus. Why is this not working?

I'm not 100% sure, but I strongly suspect that the SetFocus methods for
these controls are not working either.

Must I approach the use of these controls differently from the other
controls on the tool bar?

Thanks
Jim
 
Jim wrote...
BlankI've been trying to use two of either the "Calendar" controls or the
"Microsoft Date Picker" controls to allow a user to specify the beginning
and end of a date range. Both control types don't offer an "On Click"
event, but they do offer and "On Update" and an "On Exit" event.>
Thanks
Jim
Hi Jim, switch to the vbe and then use the Object
Procedure drop-down list at the top of the window to
select the _Click() event.

Luck
Jonathan
 
Jonathan
Is that available in Access 2002? I can't find it in the vbe tool bars.
Closest I have is the List Properties/Methods dropdown and that doesn't list
the OnClick Event.
Jim
 
-----Original Message-----
Jonathan
Is that available in Access 2002? I can't find it in the vbe tool bars.
Closest I have is the List Properties/Methods dropdown and that doesn't list
the OnClick Event.
Jim

Jim,
paste the following into your code window.
Replace 'calDate' with the name of your calendar control.

Private Sub calDate_Click()

msgbox "you choose " & calDate.Value

End Sub

Luck
Jonathan
 
Back
Top