Calendar Comtrol - OnClick event

W

Wayne-I-M

Hi all

Is there a method to force an OnClick event on a active x calendar control.

I didn’t think this was a problem as I had set it to OnLostFocus but a few
users of one DB have asked that a date is displayed in an unbound text box
OnClick.

No problem I thought. ??

Even though there is an OnClick event available, nothing seems to work
until the calendar has lost focus.

I have no problem with the coding of the event it is simply that the OnClick
event doesn’t seem to work.

The form is set allow edits, the calendar is enabled, etc. Have tried
DblClick, etc. The only thing that seems to cick off an event is
OnLostFocus, which can’t be coded eg. OnClick – SomeThingElse.setfocus, as
the OnClick doesn’t fire.

Obviously I’m missing something here.
 
C

Chris2

Wayne-I-M said:
Hi all

Is there a method to force an OnClick event on a active x calendar control.

I didn’t think this was a problem as I had set it to OnLostFocus but a few
users of one DB have asked that a date is displayed in an unbound text box
OnClick.

No problem I thought. ??

Even though there is an OnClick event available, nothing seems to work
until the calendar has lost focus.

I have no problem with the coding of the event it is simply that the OnClick
event doesn’t seem to work.

The form is set allow edits, the calendar is enabled, etc. Have tried
DblClick, etc. The only thing that seems to cick off an event is
OnLostFocus, which can’t be coded eg. OnClick – SomeThingElse.setfocus, as
the OnClick doesn’t fire.

Obviously I’m missing something here.

Wayne-I-M,

There is not a great deal of specific information above to go on.

I opened a blank MS Access DB.

I created a Form named frmForm1.

I drew a Calendar Control 9.0 control on the frmForm1 and named it
calCalendar

I drew an unbound text box on frmForm1 and named it txtDate

I added the following code to frmForm1's code page.


Private Sub calCalendar1_Click()

Form_frmForm1.txtDate = Form_frmForm1.calCalendar1.Value

End Sub


I ran frmForm1.

Every type I clicked on calCalendar, the txtDate's information
successfully updated with the appropriate date.


Sincerely,

Chris O.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top