Lebans' MonthCalendar problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi I've been using the Stephen Lebans' MonthCalendar (A2k version) code for some time (since last fall) And I just installed the newest verion. I created a new form and added the code and for some reason, something doesn't work. When I run the code (i've got it on double click event on a text box), the form stops responding (inactivated) but the calendar doesn't pop up. When I hit ctrl-break to invoke the debugger, it shows it to be stopped in the following loop:
' Enter message loop
'(all window messages are handles in WindowProc())
Do While 0 <> GetMessage(message, 0&, 0&, 0&)
TranslateMessage message
DispatchMessage message
Loop
I have an example of this but I can't get my web server up to host it. I can email the file on request
It has 2 tables, 2 forms and the monthcalendar modules. Each form has a textbox with the monthcalendar code on the dblclick event. It really puzzles me. The code is identical on both forms. Any help would be appreciate
Thanks
 
I've emailed my sample DB to Stephe

I'll post any resolution he sends me if he doesn't post it himself.
 
You did not have the Form's Load/Unload events activated. You must have
made a copy of the Form and then manually copied and pasted the code
behind the form without hooking up the necessary events. If you go into
the form that does not work and:
1) Open the Form in Design view
2) Select the Event TAB
You will see that it is blank for the Load and Unload events where it
should read [Event Procedure]

So the instance of the MonthCalendar class was never instantiated. I
will add error checking to catch this in the ShowMonthCalendar function
call.
--

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

I'm sorry I wasted your time with this, as I should have realized that. I've had that happen before. I'm used to working with Excel where you don't need to link the events with their controls. This is a flaw in Access in my opinion

I will say this tho, if you make a change in the code(other event not related to the calendar) while the form is loaded, then try to open the calendar, the window doesn't form and the same "error" happens. So some error handling would be nice

Thanks a bunch

----- Stephen Lebans wrote: ----

You did not have the Form's Load/Unload events activated. You must hav
made a copy of the Form and then manually copied and pasted the cod
behind the form without hooking up the necessary events. If you go int
the form that does not work and
1) Open the Form in Design vie
2) Select the Event TA
You will see that it is blank for the Load and Unload events where i
should read [Event Procedure

So the instance of the MonthCalendar class was never instantiated.
will add error checking to catch this in the ShowMonthCalendar functio
call
-

HT
Stephen Leban
http://www.lebans.co
Access Code, Tips and Trick
Please respond only to the newsgroups so everyone can benefit
 
Back
Top