A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Calendar Control Active X 10 problem



 
 
Thread Tools Display Modes
  #1  
Old May 26th, 2004, 12:31 PM
DubboPete
external usenet poster
 
Posts: n/a
Default Calendar Control Active X 10 problem

Hi all

I have scoured the newsgroup's past postings for an answer, but to no avail.

I have a form "Form1" with text boxes "Text0" and "Text 2"
When the form opens, so does a form "Calendar" with Calendar Control
"Calendar3"
[yes, we are in development mode, and I hope to apply it to the relevant
form when someone helps me work it out!]

I want to populate Form1.Text0 with the date that is clicked on the
Calendar3 control.

The calendar control only has the following events.
On Updated
On Enter
On Exit
On Got Focus
On Lost Focus

and not an AfterUpdate event

Could some kind soul please tell me where to put the code, and what exactly
the code should be?

TIA

DubboPete


  #2  
Old May 26th, 2004, 01:49 PM
Kerry Miller
external usenet poster
 
Posts: n/a
Default Calendar Control Active X 10 problem

Select Calendar3 and open the code editor. Near the top will be two drop
down lists. Click the arrow of the one on the right and you will find the
Click event. Simply add:

Private Sub Calendar3_Click()
Form1.Text0 = Calendar3.Value
End Sub

Not sure why you need AfterUpdate, but it's there also.

HTH,
Kerry

"DubboPete" wrote in message
...
Hi all

I have scoured the newsgroup's past postings for an answer, but to no

avail.

I have a form "Form1" with text boxes "Text0" and "Text 2"
When the form opens, so does a form "Calendar" with Calendar Control
"Calendar3"
[yes, we are in development mode, and I hope to apply it to the relevant
form when someone helps me work it out!]

I want to populate Form1.Text0 with the date that is clicked on the
Calendar3 control.

The calendar control only has the following events.
On Updated
On Enter
On Exit
On Got Focus
On Lost Focus

and not an AfterUpdate event

Could some kind soul please tell me where to put the code, and what

exactly
the code should be?

TIA

DubboPete




  #3  
Old May 26th, 2004, 01:52 PM
DubboPete
external usenet poster
 
Posts: n/a
Default Calendar Control Active X 10 problem

sorry, forgot to mention...
WinXP and Access XP
all service packs updated regularly

DubboPete

"DubboPete" wrote in message
...
Hi all

I have scoured the newsgroup's past postings for an answer, but to no

avail.

I have a form "Form1" with text boxes "Text0" and "Text 2"
When the form opens, so does a form "Calendar" with Calendar Control
"Calendar3"
[yes, we are in development mode, and I hope to apply it to the relevant
form when someone helps me work it out!]

I want to populate Form1.Text0 with the date that is clicked on the
Calendar3 control.

The calendar control only has the following events.
On Updated
On Enter
On Exit
On Got Focus
On Lost Focus

and not an AfterUpdate event

Could some kind soul please tell me where to put the code, and what

exactly
the code should be?

TIA

DubboPete




  #4  
Old May 26th, 2004, 02:13 PM
DubboPete
external usenet poster
 
Posts: n/a
Default Calendar Control Active X 10 problem

Hi Kerry,

Thanks, I found the event 'click', and added the code... however when
clicking the calendar control the code produces Run-time error '424' -
object required

any clues?
tia
DubboPete

Simply add:

Private Sub Calendar3_Click()
Form1.Text0 = Calendar3.Value
End Sub



  #5  
Old May 26th, 2004, 02:51 PM
Kerry Miller
external usenet poster
 
Posts: n/a
Default Calendar Control Active X 10 problem

Hi DubboPete,

I can't really research this at the moment but try:

Me.Text0 = Calendar3.Value

Kerry

"DubboPete" wrote in message
...
sorry, forgot to mention...
WinXP and Access XP
all service packs updated regularly

DubboPete

"DubboPete" wrote in message
...
Hi all

I have scoured the newsgroup's past postings for an answer, but to no

avail.

I have a form "Form1" with text boxes "Text0" and "Text 2"
When the form opens, so does a form "Calendar" with Calendar Control
"Calendar3"
[yes, we are in development mode, and I hope to apply it to the relevant
form when someone helps me work it out!]

I want to populate Form1.Text0 with the date that is clicked on the
Calendar3 control.

The calendar control only has the following events.
On Updated
On Enter
On Exit
On Got Focus
On Lost Focus

and not an AfterUpdate event

Could some kind soul please tell me where to put the code, and what

exactly
the code should be?

TIA

DubboPete






  #6  
Old May 26th, 2004, 04:16 PM
Dan Artuso
external usenet poster
 
Posts: n/a
Default Calendar Control Active X 10 problem

Hi,
Try:
Forms!Form1!Text0 = Calendar3.Value

HTH
Dan Artuso, MVP

"DubboPete" wrote in message ...
Hi Kerry,

Thanks, I found the event 'click', and added the code... however when
clicking the calendar control the code produces Run-time error '424' -
object required

any clues?
tia
DubboPete

Simply add:

Private Sub Calendar3_Click()
Form1.Text0 = Calendar3.Value
End Sub





  #7  
Old May 28th, 2004, 11:05 AM
DubboPete
external usenet poster
 
Posts: n/a
Default Calendar Control Active X 10 problem

Thanks all for your help, now got it working great, and implemented in users
db!

DubboPierre


 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:37 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.