Access 2002 Calender

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am running Access 2002. In on of my forms, I let the user check a date on
the calender.

When I wrote the form, it was back in August of 2006. Now, whenever I start
up the database, it always has August 2006 as the default month and the year
on the calender. How do I make it so the calender automatically reflect the
current month and year ?

Thanks for any help!
 
Assuming you are talking about the ActiveX Calendar control
that ships with Access, then just add this one line of code to
the Form's Load event:

Private Sub Form_Load()
Me.MyCalendarNameHere.Today
End Sub

Just insert your actual control name where it says,
"MyCalendarNameHere"

Compile the code, save and close the form.
When you open the form the calendar will
default to the current date.

--
Jeff Conrad
Access Junkie - MVP
http://home.bendbroadband.com/conradsystems/accessjunkie.html
Access 2007 Info: http://www.AccessJunkie.com

in message:
 
Thanks! I appreciate it very much!

Jeff Conrad said:
Assuming you are talking about the ActiveX Calendar control
that ships with Access, then just add this one line of code to
the Form's Load event:

Private Sub Form_Load()
Me.MyCalendarNameHere.Today
End Sub

Just insert your actual control name where it says,
"MyCalendarNameHere"

Compile the code, save and close the form.
When you open the form the calendar will
default to the current date.

--
Jeff Conrad
Access Junkie - MVP
http://home.bendbroadband.com/conradsystems/accessjunkie.html
Access 2007 Info: http://www.AccessJunkie.com

in message:
 

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

Back
Top