Calendar object

  • Thread starter Thread starter magmike
  • Start date Start date
M

magmike

I have a calendar object (MSCAL.Calendar.7) on a form whose control source
is CBDate. This form is only for adding records, so the form opens with a
blank uncreated record. The calendar by default, shows February of 2003
(when I created the form). So therefore, the user has to navigate the
calendar to pick the date they desire (always a future date that is far away
from the default showing date). Is there a way to have the calendar's
default view be today, or at least this month, without having to update it
every month manually?

Thanks!

Mike
(otherwise known as "punk")
 
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
http://www.access.qbuilt.com/html/articles.html

in message:
 
Back
Top