Calender

G

Guest

How do I default my access calender to today's date? I put it in my program
a couple days ago and the day hasn't changed yet
 
J

Jeff Conrad

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.
 
R

Rick B

"my access calendar"? What does that mean? Access does not have a
"calendar" per se.


To default a FIELD or CONTROL to today's date you would use...

= Date()


Rick B
 
?

??

How come Rick B couldnt give a helpful detailed answer
like that?
Does he really know anything at all about access or is he
just simply a newsgroup cop?
 
J

Jeff Conrad

Well no one here is a perfect person and everyone does make mistakes
from time to time. Also, even the experts probably don't know *every*
tiny little detail about Access. OK, maybe a few around here. :)

You become familiar with what you work with. It is possible that Rick
has not worked with the ActiveX Calendar Control before. That is no
reason to assume he knows nothing about Access! He did probe for
more information and I have no doubt if the OP responded back with
a detailed explanation of the Calendar they were using, Rick would have
easily been able to come up with a solution. Sometimes an answer
requires additional questioning. That's all.
 
G

Guest

Jeff:

I use a text box linked to ActiveX Calendar in a form to input a date into
an underlying table (their are obviously other fields in the table). The
database is already populated with more than 400 records.

I would like the default date to show (in both the text box and calendar
control) when I capture a new record. I can easily set the default date for
the text box - but the Calendar control stays unselected.

I tried your advice but find that when I open the form in edit view the
existing first record's date (both in the text field and the Calendar
control) also defaults to today's date - something I definately do not want.

So, how do I get default date to show for only new records, not existing ones?

Cowboy
 

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

Top