Full Version: Slow Button Response Time on Form
UtterAccess Forums > Microsoft® Access > Access Forms
I hope I can explain this well. It gets involved. Here we go...
My split database resides on a network. The backend is through an SQL server .adp and the front end is an mdb.
Because, of the database residing on the network, my forms were opening VERY SLOWLY. So, I created what I call a "Z" table. Which is a table created from a query. I delete all the data within the table that transferred from the query. Then, I used the empty Z table as my record source. The form also has a couple of subforms within it as well. They also have a record source of empty tables. This works great, you can count to 4 and the form now opens vs a count of 45 (yes it was that bad). In order for everything to work properly, I have a start button on the form and behind the form, I have the following code:
Private Sub cmdopenform_Click()
If Me.RecordSource = "Z_QRYCombinedMonthlySummary" Then Me.RecordSource = "qryCombinedMonthlySummary"
If Form_sfmTop10DealerRejects.RecordSource = "Z_qryFSRejects" Then Form_sfmTop10DealerRejects.RecordSource = "qryFSRejects"
Form_sfmTop10DealerRejects.FilterOn = True
If Form_sfmSummaryRejectCodes.RecordSource = "Z_qryFSRejectReasonCodes" Then Form_sfmSummaryRejectCodes.RecordSource = "qryFSRejectReasonCodes"
Form_sfmSummaryRejectCodes.FilterOn = True
Form_MonthlySummary.Filter = "DateID=" & Nz(Me.Month_Filter, 0)
Form_MonthlySummary.FilterOn = True
End Sub
Before I get too far, I also have a drop down combo named Month_Filter. The user selects the Month and then selects the start button to populate the data.
My issue is that although the form now opens on the count of 4 when I select the start button, I can count to 35 before the data populates. So, I am almost back to square one. I checked my querys and they open at the most the count of 8.
Ocan only guess, it must be how I have the code set up.
Please advise, how I can get this form to open faster when the start button is selected.
Where is the Front End.
Does every user have their own copy of the Front end or is it shared.
Sorry, for the slow response time. My front end on the network. my split backend also is through an SQL server. Right now I am the only one accessing the database since it is still in design view. So, it is not like several people are accessing at the same time. I am planning when the database is published that everyone will have their own copy.
I'd still put the frontend on your local drive.
There are usually 2 things that cause a form to load slowly. The first is the size of the recordset behind the form. Follow this link to Create Powerful Bound Forms that reduce the size of this recordset.
Also, a large number of subforms will also slow load time. One method to minimize this effect is to use recordsources for the subforms that refer to the Primary Key of the record on the mainform, rather than the traditional Master/Child Linking Fields. Then, requery a subform only when its page becomes is selected.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.