Calendar Control 11.0 Default Date

I'm using the ActiveX Calendar Control 11.0 in Access and am having a difficult time setting its default value as today's date.

I've tried creating an event to run when the form opens to set the value using every combination I can think of or find on the web, any help would be great!

Here's what I've tried:

calendar.value=Date
calendar.value=Now()
calendar.today
inetomahaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Data-ManCOOCommented:
Try this..I use this in my Access application.

Me.ctlcalendar.Value = Date

I recommend prefixing the name of the calendar control with something ( I used ctl for control).

Mik
0
inetomahaAuthor Commented:
No Dice, it still shows up with no date selected. Is this something I shouldn't be putting in the VB code and I should have it else where?
0
Data-ManCOOCommented:
can you post the code you are using?   Include the entire event procedure.

Thanks,
Mike
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

inetomahaAuthor Commented:
Private Sub Form_Open(Cancel As Integer)

Me.Calendar3.Value = Date

End Sub
0
hgj1357Commented:
is your calendar bound to a field?

H
0
inetomahaAuthor Commented:
Basically I have the control on a form and I want it to default to today's date, so I put the code to set the date in the form open event procedure, seeing as how the control doesn't have the option for an "On Open" event.
0
inetomahaAuthor Commented:
No, it's not bound to a field.
0
inetomahaAuthor Commented:
The form shows the user a dispatch sheet to track employees and their jobs/tasks for the day. I want the calendar to default to the current date and then thus show the current day's tasks for the employees based on the calendar but the darn thing is being stubborn.
0
Data-ManCOOCommented:
What version of Access are you using?  What format is your database in (2000, 2002)?


Mike
0
inetomahaAuthor Commented:
Access 2003 (11.6355.6360) SP1
0
hgj1357Commented:
Use a bound date field.

This will help you to show activities, as you can link a subform to this field.

then use these:

Private Sub Calendar3_click()
Me.MyDateField.SetFocus
End Sub

Private Sub Form_Load()
Me.MyDateField = Date
End Sub
0
inetomahaAuthor Commented:
Bind it to what? A table with a field full of dates?
0
hgj1357Commented:
No, just one date field on the table behind the form that holds the calendar object.

The table could have just one record, you just need the date to filter your activities, and to anchor your calendar.

H
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SidFishesCommented:
name your calendar control something like Kalendar (seem to remember it doesn't like calendar)


then use the form_load event

private sub form_load()
 Me!Kalendar = Date
end sub
0
inetomahaAuthor Commented:
That did it! Thanks a lot H and Mike!

-marshall-
0
Data-ManCOOCommented:
I made that recommendation in my first comment...Glad you got it to work.

Mike
0
inetomahaAuthor Commented:
I was using the word Calendar as an example, I acctually have it called ctlCalendar3.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.