Solved

MS Access Form loads slow

Posted on 2007-11-20
14
631 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

622 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