Access 2003 Calendar Control 11.0 value update

D

David G.

Everything I've read so far says the calendar control's date can be
changed in VBA by:

CalendarControlName.Value=ControlName.Value

where ControlName.Value is a valid date.

DOESN'T WORK!

I've tried

CalendarControlName.Value=#05/05/2010#
CalendarControlName.Value="05/05/2010"
CalendarControlName.Value=cdate(ControlName.Value)

The day, month, and year values don't update. I'm able to effectively
use the calendar control on a pop up form to change text box date
values just fine. The only problem I'm having is setting the date when
the pop-up form opens. The code

me.ocxCalendar.Value=dteMydate

runs when the pop up form opens, without any errors, but the calendar
control's selected date won't change.

What am I missing?
THANKS!
David G.
 
D

David G.

Must set the focus to the calendar control before changing the date
value.

Everything works as expected now!
THANKS!
David G.
 
T

Tony Toews

Everything I've read so far says the calendar control's

See the Calendar Tips page at my website
http://www.granite.ab.ca/access/calendars.htm

There could, likely will, be lots of version problems when you go to
distribute the MSCal.OCX..

One alternative is MonthCalendar is a completely API generated Month
Calendar derived directly from the Common Control DLL. There are
links to several downloadable calendar forms at my website. As these
are forms you can also do anything with them you want.

You can also use the calendar form which comes in the Access <insert
your version here> Developers Handbook by Litwin/Getz/Gilbert,
publisher Sybex www.developershandbook.com. These books are well
worth spending money. Every time I open one I save the price of the
book.

Duane Hookum has an awesome and simple calendar in a report. See the
Calendar Reports sample section at
http://www.access.hookom.net/Samples.htm

Tony
 

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