A Real-time Calendar in a FORM

A

Airdaniel \(BZE\)

Hi Guys,

I thought u could help me.
I have a small library of books that I lend to the
children in my community.
I have made the database and can keep track of who and
when my books are borrowed, etc...
What I need help in is that I want to place a "Visual"
Calendar on the main form of my database. I would like
this calendar to change dates normally like the system
calendar. I have for example placed the Active...something
calendar on the form, but when I go back on the database
the next day, the date does not change accordingly, so I
was wondering if there is a way to place a calendar
that "is in my face", so that I can count the days and so.
If anyone can help me, I would appreciate it a lot.

Bye.
 
J

Jeff Conrad

Hi,

I'll take a stab at this.
Sounds like you put the ActiveXCalendar control that comes with Access on
your form.
Correct?
Every time you open that form it defaults to showing the day you actually
put it on the form.
Correct?

If so, just add one line of code to the Form's Load event like so:

Private Sub Form_Load()
MyCalendar.Today
End Sub

Just replace "MyCalendar" with whatever you have named your calendar on the
form.
Now each time you open the form it should default to showing the current
day.

Hope that's what you're looking for.
Jeff Conrad
Bend, Oregon
 
P

PC Datasheet

Open properties and get the name of the calendar control.

Then put this code in the OnCurrent event of your form:
Me!NameOfTheCalendarControl.Value = Date()

Your form will now open with the calendar showing today's date!
 

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