Mike-
Works for me. I created a new form, added a Calendar control, named it
CalControl, and put this in the form's Load event:
Me.CalControl.Month = Month(Date)
Me.CalControl.Year = Year(Date)
Me.CalControl.Day = Day(Date)
Note that you must use the name of the control, not the name of any bound
field - but I think you said this is unbound. I purposefully set the values
of these three properties to something other than today before loading the
form, and it does move to today's date.
John Viescas, author
"Building Microsoft Access Applications"
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Mike Bisson
Sent: Thursday, January 19, 2006 10:47 AM
To: [email protected]
Subject: RE: [ms_access] Calendar Control
Hi John,
Inserted that code, but it's not working. I have it in the On_Load event
for the form. Should I move it to a different event?
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of John Viescas
Sent: Thursday, January 19, 2006 9:30 AM
To: [email protected]
Subject: RE: [ms_access] Calendar Control
Mike-
The stupid Calendar control has separate Year, Month, and Day properties
that determine what "current" date is displayed. So, do:
Me.CalendarStart.Year = Year(Date)
Me.CalendarStart.Month = Month(Date)
Me.CalendarStart.Day = Day(Date)
John Viescas, author
"Building Microsoft Access Applications"
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Mike Bisson
Sent: Wednesday, January 18, 2006 10:37 AM
To: [email protected]
Subject: RE: [ms_access] Calendar Control
Well, I thought I had it figured out...
Here goes again -
I have a form with 2 calendar controls on it 1) is named CalendarStart and
2) is named CalendarStop.
What I've done is in the Form_Load event, I've added the following code:
CalendarStart.Value = Date
CalendarStop.Value = Date
But the calendars are not displaying the current date when I view the form,
they are displaying the date I added the calendars to the form.
As usual, any help is greatly appreciated :)
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Mike Bisson
Sent: Tuesday, January 17, 2006 2:31 PM
To: [email protected]
Subject: [ms_access] Calendar Control
Never mind, I figured it out!
==================================
Mike Bisson
Manager of IT & Logistics
Carthuplas, Inc.
V: 207-985-4972 x658 F: 207-985-2105
[EMAIL PROTECTED] http://www.carthuplas.com
Yahoo! Groups Links
Yahoo! Groups Links
Yahoo! Groups Links
Yahoo! Groups Links
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ms_access/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/