ActiveX Calendar CurrentDate (1 Viewer)

Neo90815

Registered User.
Local time
Today, 01:33
Joined
Jul 26, 2000
Messages
64
Hi,

I have an ActiveX Calendar that would not update to current date. Please help, how would I default the calendar to the current date??

Previous post shows the following code to default calendar to current date, but it does not work.

******************************************
Calendar.Value = IIf(IsNull(cal), Date, cal.Value)
*****************************************

Thanks!
 

gino

Registered User.
Local time
Today, 01:33
Joined
Mar 16, 2000
Messages
117
in the onLoad or onOpen event insert this code:

me.calendar.value=date

this should work............
no if statement needed!

[This message has been edited by gino (edited 08-17-2000).]
 

Neo90815

Registered User.
Local time
Today, 01:33
Joined
Jul 26, 2000
Messages
64
Sorry that did not. I placed in the OnUpdate....

Any other suggestions. I tried

'I tried the name of my ActiveX Calendar, 'this one I think make sense... NameCal..the 'value equal the date... but did not work

Me![ActiveXCtl20].Value = Date

'And I tried

Me[Calendar].Value = Date

'And I tried using the name of my Form

Me![Calendar2].Value = Date

Thanks again... any other suggesitons?
 

gino

Registered User.
Local time
Today, 01:33
Joined
Mar 16, 2000
Messages
117
first of all what is the name of your calendar?

this is what i posted
"in the onLoad or onOpen event insert this code"
did you insert the code in your onLoad or onOpen event?

this will not work in the onUpdate event.

let us know if you need anymore help....

[This message has been edited by gino (edited 08-17-2000).]
 

Neo90815

Registered User.
Local time
Today, 01:33
Joined
Jul 26, 2000
Messages
64
Thanks Gino!

Okay, I created a form called Calendar2. I inserted an ActiveX Calendar name [ActiveCtl23].

Under "Event" in [ActiveCtl23] Properties I have the follwing:

On Update
On Enter
On Exit
On Got Focus
On Lost Focus

That's all. I did not see On Load or On Open anywhere. I'm using Access 2000, and it's an ActiveX Calendar Version 9.0

Thanks
 

gino

Registered User.
Local time
Today, 01:33
Joined
Mar 16, 2000
Messages
117
open your form properties..rather than the object itself. click on the top left box in design view of your form to open your form properties.

[This message has been edited by gino (edited 08-17-2000).]
 

Neo90815

Registered User.
Local time
Today, 01:33
Joined
Jul 26, 2000
Messages
64
O My GOD!

You are wounderfulllll!!!!!

It working!!!

It did not like "On Open"... I placed the code in "On Load".

As suggestioned; In my Form Properties, "On Load" , inserted an Event Procedure code:

**********************
Me.MyCalName.Value = Date
***********************

Perfect!!!

Thanks a million!
 

Users who are viewing this thread

Top Bottom