Allen Browne's Calendar97.mdb

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

This may be asking too much, but does anyone know how to use the calendar
(frmCalendar) from Allen Browne's Calendar97.mdb as a subform on a main
form, rather than as a modal popup?

I would like to use the calendar's default date (today) or change to another
date as needed,obviously, but also make selections on other controls on the
main form without closing the calendar. Having a hidden text box to hold the
calendar's value would not be a problem.

I tried using it as a subform, but when I open the main form I get an error:
"The expression you entered refers to an object that is closed or doesn't
exist". If I use a command button on the main form to open the popup
calendar as intended to set the value of a textbox, then the subform version
of the calendar also will work to set the value of that same textbox. I just
don't understand the code well enough to make this work using only the
subform.

I'm trying to replace MSCAL.Calendar.7 which works fine all the way through
Access 2007, but doesn't work in Access 2010. I would rather not go to a
popup calendar and would prefer not to have to install Access 97 on
computers already loaded with Access 2010. My design work is still in Access
97, so whatever changes I make need to start there.

Thanks for any assistance.
Mark
 
Because it's just a simple little Access form, you can adapt it any way you
want, including using it as a subform.

Of course, you will need to rewrite the code to match your adaptations.
 
Allen,
Thanks for the response. It's a great little calendar. I'm just not very
proficient in coding and was hoping for some help in adapting it as a
permanent subform. When the main form opens, the subform apparently cannot
find something it needs and I get the message: "The expression you entered
refers to an object that is closed or doesn't exist".

Do I need to place the code that's normally attached to the calendar command
button (the button that opens the calendar) somewhere on the main form or in
the calendar's open event?

Thank you.
Mark
 
As it stands, the code sets a global variable to the text box and assigns
the value back to that text box when you choose a date.

Since you are not opening it modally, and you could (at least in theory)
have multiple instances open at once, you will need to perform a more
serious re-write.
 
Thank you, Allen. I was hoping it would be something fairly easy to change,
but I'll keep trying to figure it out. It would be a nice replacement for
MSCAL.Calendar.7. Meanwhile, I'll try installing Access 97 on the computer
with Access 2010 just so I don't have to install a pop up calendar on all
the other frontends.
Mark
 
Back
Top