Default value for Calendar

L

Leszek

Hello,

I would like to set the current date as a default value for my Calendar
control.
How to accomplish this?

Thanks,
Leszek Taratuta
 
V

Van T. Dinh

There is a Today Method for the Calendar Control.

Me.MyCalendarControl.Today

Check Access VB Help on the Today Method of the Calendar Control.
 
V

Van T. Dinh

It works fine for me in A2K and AXP!

Assuming that you use the Calendar Control that comes with Access, describe
how you use the Calendar Control and which Event you use to run the Today
Method.
 
V

Van T. Dinh

I don't think the AXControl is instantiated yet in the Form_Open Event.
In my code, I use the Load Event.

I checked one of my databases using Calendar 9.0 in A2K and the Today Method
works fine with the Form_Load Event.
 
L

Leszek

Thanks a lot!
Now it works fine. I just used a wrong event handler.

Leszek Taratuta
 
L

Leszek

The Access VB Help has little information about this method:

"You can use the Today method to set the value of the Calendar control to
today's date: controlname.Today
The Today method has the following argument: controlname - The name of the
Calendar control object."

I am a little bit confused about this description. Anyway when I have tried
to use the Today method it does not work properly: Me.MyCalendar.Today

The calendar control is set by default on a day when I created the control
on a form (it's wierd, isn't it?) and any method cannot change it!

Any other suggestions?
Leszek Taratuta
 

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