Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Distributing MDE / Window Close Event

Status
Not open for further replies.

sochidog

Technical User
Jun 26, 2003
22
CA
Hi there...

Two questions:

1. Any suggestions on an effecient way of handing out MDE's to my collegues for placement on their C:\ drive?

I've put in logging code to catch them if they log in with an old MDE.. but I want something more proactive.

2. My collegues are leaving access using the X at the top right of the screen, instead of using my logout button. Inelegant shutdowns sometimes corrupts the database (as well as lunar eclipses). What is the code to capture the window/application closing event.

Thanks in advance
 
1. Check out thread700-547270.

2. This is pretty easy. The form that has your custom exit button should always be open, whether or not it's visible. In the unload event of that form, check to see if the tag of your exit button is "AllowExit". If not, cancel the event. This will prevent the application from closing unless that's in the tag of that button, and will prevent the forms from closing (I'm guessing they all close in order, and since this form is always open, that means it's the first one open, and when it doesn't close, the others don't (but that's just a guess as to why none of the other forms close)). In the click event of that button, after doing everything else you need to do, but before the application.quite line, set the tag of the button to "AllowExit".

Hope this helps.

Jeremy

==
Jeremy Wallace
AlphaBet City Dataworks
Affordable Development, Professionally Done

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top