Calendar Question

H

Harv

Hi, Maybe you have some suggestions for me. I am creating a database that
will have one entry for most dates. Is it possible to show which days have
been entered on the Calendar control that comes with Access?

Any suggestions would be greatly appreciated.

Thanks
Harv
 
P

PC Datasheet

This is complicated but will work very slick ---

Create a custom collection to store the dates that have been entered. At
each click on the calendar, iterate through the collection to see if it has
already been selected.
 
H

Harv

Not sure that is what I'm looking for. Is is possible to change how the
calendar looks so the user would know at a glance which dates have been
entered. Any information is appreciated.

Thanks
Harv
 
P

PC Datasheet

No! The days on the calendar control are mutually exclusive. When you click
any day, the previously "marked" day becomes unmarked. Look around for
another calendar control that is not ActiveX. Stephen Lebans at lebans.com
has a Month View Calendar and Getz has one in the Access Developers
Handbook. These are opensource code calendar controls and you can reprogram
them to do what you want.

BTW, with the previously selected dates stored in a collection, you could
have a listbox on your calendar form to see a list of the previously
selected dates.
 
S

Stephen Lebans

Both the Microsoft Month Calendar ActiveX and my MonthCalendar control
expose a DayState property that allows you to BOLD selected dates. It's
not an easy property to use but it does work.
http://www.lebans.com/monthcalendar.htm


In the Form's Load event or anytime before you open the MonthCalendar
use code like:

mc.SetBoldDayState numYear:=2004, numMonth:=1, day:=1, ResetMonth:=True
This BOLDS the date of January 1,2004

It also RESETS any existing BoldDayStates for this Month to NOTHING. In
other words ResetMonth means to clear out all existing Bold DayStates
for this specific month. If you are issuing multiple calls to set this
property then you would only set the optional ResetMonth parameter to
TRUE for the first call!



--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 

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