Solved

MS Access Form loads slow

Posted on 2007-11-20
14
627 Views
Last Modified: 2013-11-28
I have a MS Access 2003 Form that loads really slow.
On this form there is 4 field boxes that have queries behind them. On the entrance one query is running. The others run based on options chosen by the end user.

How can i make the form open up quickly? I've tried to turn subsheet off, seen there was something out there about making the form hidden and then not hidden. But only thing is everytime the end user logs in they need to go through a login process and then there is that query on the form it's trying to run but it can't because it's hidden.

Any answers to this would be really helpful. Thanks
0
Comment
Question by:jseaman12
  • 6
  • 4
  • 2
  • +1
14 Comments
 
LVL 11

Assisted Solution

by:Angelp1ay
Angelp1ay earned 260 total points
ID: 20320928
Is the query massive?
Does it connect to an external data source over a slow network?
0
 
LVL 11

Assisted Solution

by:fanopoe
fanopoe earned 120 total points
ID: 20322046
Does the query run fast as a stand alone query?
If not, can you index the tables it is sourcing?
Are you using conditionals in your query (iif, dlookup, sum, etc...)? these can all slow a query down.
If the query runs fast and the form is still slow, are there a lot of graphics on the form that have to loaf? Id there a validation process that is happening as well?
you can put a debug.print statement in the form open event and put a breakpoint on that, then open your form and step through it. That should help spot the culprit, but I'd start with the query.

hth
0
 

Author Comment

by:jseaman12
ID: 20322288
The query is indexed very well, the query outside of the form only takes .02 seconds to load. It's only loading 3 fields out of 190 selections.

The Form takes forever to open.
0
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
LVL 11

Assisted Solution

by:fanopoe
fanopoe earned 120 total points
ID: 20323144
can you step through the code using a breakpoint and find where it is hanging?
0
 

Author Comment

by:jseaman12
ID: 20323943
It's hanging on the opening of the form.
The query runs quickly.
0
 
LVL 11

Assisted Solution

by:Angelp1ay
Angelp1ay earned 260 total points
ID: 20324617
How many controls do you have on the form?
Do you have any other code running before the query?
0
 

Author Comment

by:jseaman12
ID: 20325164
When you say Controls you mean buttons? If so there may be 10 buttons.
One Main query at the beginning. There are 3 other queries but they need to be initiated and at first there are 0 results.
0
 
LVL 20

Assisted Solution

by:clarkscott
clarkscott earned 120 total points
ID: 20326757
A control is ANYTHING on the form; text boxes, combos, labels, subforms, command buttons, etc.
If you have many of these the form will take longer to load.

Of course, all control record/row sources will add to the time.

Scott C
0
 
LVL 20

Assisted Solution

by:clarkscott
clarkscott earned 120 total points
ID: 20326763
also,
Hidden queries can be accessed by forms and code just as if they weren't hidden.  They are only hidden from users - not the app.

Does your form query contain many joins?  If so, and your data is large, this could be part of the issue.

Scott C
0
 
LVL 11

Assisted Solution

by:Angelp1ay
Angelp1ay earned 260 total points
ID: 20326953
<< and at first there are 0 results >>
<< Does your form query contain many joins?  If so, and your data is large, this could be part of the issue. >>
This is a good point. Even if in the end you get no results it may take a while for Access to determine this!

You did say that the lag was before the query runs though. If you put a break point right at the start of your Form_Open event and another right at the start of your From_Load event can you identify where the lag is?
0
 

Author Comment

by:jseaman12
ID: 20327466
You know what I'm working on it now, I'm not 100% but there is a query I found on the opening form that is pulling a query that it shouldn't be. It's taking a long time and I'd bet this is why my form is taking forever to pull. I'll make sure that's correct and give points out for everyones help.
0
 

Author Comment

by:jseaman12
ID: 20327574
Update! Here is what was causing my issue.
I had a scenario where the end user would choose a particular id and a date range for that id.
Textbox had a query behind it that would call a SQL Passthrough and run with that.

What was occurring is that when the application was closed that query still resided in the pass through and the textbox would make that call and cause it to slip up again.

I'm going to wipe out all pass through queries that are affected with the form to save time on opening.

Thanks for your help everyone.

-Jeff
0
 
LVL 11

Accepted Solution

by:
Angelp1ay earned 260 total points
ID: 20340323
So this is fixed?
0
 

Author Closing Comment

by:jseaman12
ID: 31410147
However it put my mindset in the right method and helped me figure out the solution. Thanks
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question