Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Platform: Access 2000 logic with forms

Platform: Access 2000 logic with forms

Platform: Access 2000 logic with forms

Platform: Access 2000


I am having difficulty figuring out the logic behind closing the forms in my database.  I have just changed the structure of my database sothat it loads all forms in hidden mode on startup and then unhides
them when the user chooses to open them.  When the user chooses to close a form I simply hide it and reset its data.  This works fine until you want to close the application in which case the the cancelling of the forms' unload events, ends up cancelling the application close.

I thought that I might be able to work around this by loading a hidden dummy form on startup and then when the application calls its unload event setting a flag to true.  This way when the other forms unload events are triggered they can check this flag and decide whether or
not to cancel unload.  However, I cannot find a way for my dummy form to be the first form that is unloaded and therefore cannot insure that the flag is set.  Furthermore, once one form has cancelled application shutdown, access does not even move onto the dummy form to set the

I thought that I'd remembered a way to do this in VB.  The queryunload event, which passes the cause of the event as a constant.  Is there away to obtain the functionality of this event in Access.

I also have the option of providing my own close buttons on forms and then simply hiding them when it is clicked, this way there is no code in their unload events.  However, if possible I would like to stay with the original control box close buttons.

Please forgive the length of my submission, any ideas, or pointers in the right direction would be greatly appreciated.

Justin Carroll

RE: Platform: Access 2000 logic with forms

What purpose does loading every form serve?  Loading every form is using up precious memory. On your PC.  If your forms load slow then buy faster computers. Access has everything to do with CPU Speed and Memory. PIII 500 with 128 meg is the norm  If your company can’t affords faster computers then they are not looking at the most productive solution to keeping themselves in business.
I think you are spending way to much theorizing rather than getting the program finished.


Ask me how Bar-codes can help you be more productive.

RE: Platform: Access 2000 logic with forms

Hey DougP, Some companies will not shell out the dollars for faster PC's.  My company is using P1 166's for all of the laptops.  I've got to deal with it.
I think you are very correct, but it's not fair to dump on jcarroll because his company may be "thrifty". ;)

jcarroll: I think DougP is correct in saying if you load all the forms on startup, you may be asking for out of memory problems, or lot's of disk caching.

I have a set way of loading my screens:  Let's say the screens are opened 1,2,3.  If the user opens screen 1, you open 2, and maybe 3 in the background.  Then you can have your cake and eat it too.

I hope this helps.

RE: Platform: Access 2000 logic with forms

Hi guys, thanks for your reply's.  My biggest problem isn't deciding when to load up my forms.  In fact, Bigfoot, loading the forms your way would be perfectly fine for my application.  Heck, I don't really need to pre-load at all.  

To summarize, I am not looking for a performance boost when the users first open their forms.  Instead I am looking for a performance boost when the user is re-opening forms, forms that they have intuitively closen while switching to other forms in the database.  That is why I am only hiding them instead of closing them.  

I don't know.  It just seems strange that nobody else has had a need for a form_QueryUnload event and found a workaround.


RE: Platform: Access 2000 logic with forms

I agree with the above. If you still neeed to hide some forms rather than close them, you might simply set the CloseButton property of the forms to No and add your own button that hides rather than closes the form. That way you don't have to mess with the actual OnClose event.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close