Slow Closing of Form

B

Ben

Environment:
1. Front-End - MS Access 2003
2. Back-End - SQL Server 2005
3. OS - Windows XP


I cannot understand why it takes a 5-7 seconds to close our Invoice form.
The Invoice form has several data components in it that retrieves data.

The code in the "Done" button of the form perform the following:
a. Me.Requery
b. Check other loaded forms "IsLoaded()"
c. DoCmd.Close

The form has also a code in the "Close" event which only checks for loaded
forms again "IsLoaded()".


Thanks,

Ben
 
A

Arvin Meyer [MVP]

Check to make sure that you aren't saving any form filter or server filter.
Access, since version 97, has a habit of saving filters (you'll see them in
the property sheet). If it's doing that, it can slow down the close by 5 to
10 seconds.
 
M

Mark A. Sam

Ben,

Try taking out the requery. I done see that it has any purpose since you
are closing the form. When you are checking for loaded forms, are you
taking any action if they are open? That may be taking time. Whenever you
take action it takes time to perform them, especially requery.

God Bless,

Mark A. Sam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top