Slow Closing of Form

  • Thread starter Thread starter Ben
  • Start date Start date
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
 
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.
 
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
 
Arvin,


What I did to try your suggestion, were the following:
a. created a sql pass-through query
b. modified the old form to use the new query
c. at runtime, dynamically modify the SQL in the query via QueryDefs

The speed seems to be working. But the true test will be when the program
is used with all 15 users accessing the SQL server.

In relation to speed issues, what other factors in MS Access that would
cause the application or a certain part of an MS Access application to slow
down?

I will update you regarding my observation to the changes this coming week
and will see.


Thanks,

Ben
 

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

Back
Top