cal control - default date

  • Thread starter Thread starter SAC
  • Start date Start date
S

SAC

I would like to set the default date for the cal control to today.

I've placed the cal control on a form and on the form's open event I put in:

objCalControl.Value = Date()

But this isn't changing anything.

What do I need to do?

Thanks.
 
Try the Current Event.

I found that setting the value of the Calendar Control doesn't work until
the Current Event (tested in A2K).

If you want, you can use the Today Method of the Calendar Control which
works from the Form_Open Event.
 
Don't know why but setting the value for the Calendar
Control doesn't work until Current Event om my PC (tested
on 2 different Forms in A2K).

Van T. Dinh
MVP (Access)


-----Original Message-----
It works using the On Load event of Access 97, 2000 and 2002 on my
machine.

RDH



------------------------------------------------
 
Thanks, the on current event did it for me.


Van T. Dinh said:
Try the Current Event.

I found that setting the value of the Calendar Control doesn't work until
the Current Event (tested in A2K).

If you want, you can use the Today Method of the Calendar Control which
works from the Form_Open Event.
 
Thanks. Now I can use either the on_load or the current!

Seems odd that on_open wouldn't work.

I appreciate it the help.
 
RDH -

You are a life saver. I was having the same issue and moved my code from the OnOpen to the Load event and now it works! Thank you!
 
Back
Top