Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calendar value on open

Status
Not open for further replies.

traffas

Programmer
Feb 27, 2002
42
0
0
US
Thank you for reading this and taking time to help a novice.

I have a activeX calendar control on a form. I use the control to select dates for queries. This part works wonderfully. However, everytime i open the form containing the calendar -- it opens to a date in april. I can manually reset the date through by opening it in design mode and setting the value of the control through properties ...... but I can not pass a value ( the current date ) to the calendar by using 'VBA code' or by setting the value to 'Date()'.

How do i get it to open to the current date?

Many thanks
shawn
 
On your Forms OnLoad event put this:

MonthView = the name of your Calendar

Me.MonthView.Value = Date


Hope this helps

Rich
 
or try this


You can use the Today method to set the value of the Calendar control to today's date.

Syntax

controlname.Today
 
Gentlemen, I am using access 2000. The examples that you have given me do not work. I have tried: 'me.activexctl0.value = today' & 'me.activexctl0.value = date', i've tried activexctl0=date and activexctl0=today. still will not work. These are on the form 'open' event.

The programing looks like it should work, but alas I must be doing something wrong.

help

many thanks in advance......

Shawn
 
Place the code in the forms OnLoad event

Should look like this:

ActiveXclt10.Today

drop the "me"


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top