Qcalendar defaulting to system date when form is opened

humph

Registered User.
Local time
Today, 08:19
Joined
Sep 7, 2006
Messages
69
Hope someone can help with this - firstly I have very basic VBA knowledge so sorriy if it is easy to those who know. Cant find any other thread on the default date but sorry if already on there.

I have a couple of calendar files in my database and I would like the form to reset the calendar to the system date or todays date or this month - basically to avoid the user having to key forwards a number of months.

Is this possible and how?

Thanks

Humph
 
Hope someone can help with this - firstly I have very basic VBA knowledge so sorriy if it is easy to those who know. Cant find any other thread on the default date but sorry if already on there.

I have a couple of calendar files in my database and I would like the form to reset the calendar to the system date or todays date or this month - basically to avoid the user having to key forwards a number of months.

Is this possible and how?

Thanks

Humph
Not sure what kind of calendar control you are using. From the toolbox I dropped a Calendar control onto the form. I was able to change the date (for instance in the Form_Load event) using code,

Dim C As Object
Set C = Me.Calendar0
C.Day = 5
C.Month = 7
C.Year = 1988

This is late binding. When I tried early binding (as follows) I got a Type Mismatch error:


Dim C As MSACAL.Calendar

Anyone know how to early bind the CalendarControl? (I'm using Access 2003).
 

Users who are viewing this thread

Back
Top Bottom