We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now


Problem with Access 2000 Zoom Control.  Modal form freezes app. to user input.

steverke asked
Medium Priority
Last Modified: 2006-11-17
1) Have a hidden form with a timer event. In the case that a user has left the app. alone too long, the timer event opens a warning form with a countdown.  It's opened with the Modal property = true.  There is a CANCEL button that resets the timer and rehides the warning form.  If the timer reaches it's end, it closes and saves all.  It works great except...

... if a user has ZOOMED in on a control and is editing it's data using the Access Zoom Control (SHIFT+F2).

In this case the countdown dialog appears and counts down.  However the Zoom Control and My Modal Form seem to conflict and put the app. in a state immune to user input.  The only recourse is to wait for the timer to expire.

I need to be able to allow users to Cancel even if the Zoom form is open.  This seems to be Windows API-level behavior, but I'm not at all familiar with Windows API stuff, nor do I want to learn it.  Any suggestions for how to handle this situation?

Thank you in advance.
Watch Question

Did you place a DoEvents in the countdown loop ?



This is a good suggestions, however it did not work.  I put DoEvnets into the code and used logging to verify that it was being called.  In tests, DoEvents was called dozens of times and Access did not respond to any of my mouse clicks.  I even tried changing the timeout form's modal state to NO, with no effect.

It's not a countdown loop.  The time check occurs in a Form's Timer event.  Every so often, 1 second, 5 seconds (however configured - varies based on how soon until timeout) the form checks the current time vs. the saved time.  When it is close to autoshutdown, the countdown form is made visible and then counts down.  The countdown clock is adjusted by the forms OnTimer event... Hence no looping.

I'm starting to think I'll need to build a custom ZOOM Form.  Probably, the Access ZOOM control needs to be yielding to Windows Events but does not.  Don't know enough about it to guess.

Any other suggestions before I build my own ZOOM?

Thank you.

Hmm did you also try to use:
Modal property = false
I've had some trouble with modal/popup forms as they didn't trigger events when returning to the mainform...



I did set modal = false prior to calling DoEvents.  Didn't work.

Just tried explicitly setting the focus to the shutdown form prior to calling DoEvents.  No good.

Still experimenting... any suggestions are VERY welcome.

Thank you.

Unlock this solution with a free trial preview.
(No credit card required)
Get Preview


I thought about trying to track or muscle the Zoom cotrol via Windows API, but I have too little knowledge/experience along those lines to be able to figure it out expiditiously.

Thanks for the suggestions, however. The parallel MDB idea is clever... but I'm not too thrilled with the idea of having an extra .mdb just for timing out my users. In any case, your suggestions are on the mark and you will get your points.  

I've decided to create my own Zoom Form... a quick fix... and have it explicitly interact with the timeout process to share control and track the application state.  Will only take a couple hours to prototype out. Hopefully it works ;)

Let me know when I can assist.

Success with the application !



Should have just done this in the first place.  The problem was that the first modal form opened doesn't yield control to the second modal form opened...  won't even listen for DoEvents.  Yuck.

Anyway... the solution was cake once it hit me:  Created my own simple Zoom form.  Modified the autoshutdown form in two places.  During the countdown, if the Zoom form is open, the autoshutdown sets Modal = False on the Zoom form and focus to itself.  The cancel buttons click event cancels the shutdown, sets focus back to the zoom form, and sets the zoom forms Modal = True. Voila.  Took less time to prototype than it did to ask the questions.

Sometime Brut force and simplicity wins.  I have to stop trying to be too slick.

Thanks again for your help.

Just having someone to explain the trouble to sometimes helps best :-)

Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.