PC Review


Reply
Thread Tools Rate Thread

Calendar Comtrol - OnClick event

 
 
=?Utf-8?B?V2F5bmUtSS1N?=
Guest
Posts: n/a
 
      2nd Jun 2007
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
Manchester, England.

 
Reply With Quote
 
 
 
 
Chris2
Guest
Posts: n/a
 
      3rd Jun 2007

"Wayne-I-M" <(E-Mail Removed)> wrote in message
news:B276DB05-B81B-47B7-932D-(E-Mail Removed)...
> 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
> Manchester, England.
>


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.


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OnClick event does nothing =?Utf-8?B?U00=?= Microsoft Access Form Coding 7 18th Apr 2007 07:53 PM
Textbox LostFocus event fires after Command Button's OnClick event teddysnips@hotmail.com Microsoft VB .NET 14 10th Aug 2006 01:47 PM
Calendar Control 11 - No onClick event Simon Harris Microsoft Access 3 20th Mar 2006 10:06 PM
how to handle both onmouseup event and onClick event JerryG Microsoft ASP .NET 0 20th Dec 2005 03:49 AM
OnClick event simon Microsoft ASP .NET 1 11th May 2004 11:05 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:58 PM.