Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form Speed SLOW !!! 1

Status
Not open for further replies.

vzjfgm

Programmer
Jul 24, 2003
34
US
I am working on a form with several subforms that runs extremely slow. I tried to disable name autocorrect. I read the tread 702-206410 that states to unbound your form and set the record/countrol sources in the Load event of the form. It's not working for me. I'm getting a runtime error 2467 - object is closed or doesnt exist. Here is my code. Please advise. Thank you!!!!


Me.RecordSource = "tbl_employees" (works OK)
Me.datasheet_Manpower_Act.Form.RecordSource = "qry_weekly_employees" (ERROR 2467)
 
Is datasheet_Manpower_Act a subform ?
Then your coding should be correct.

But then this contradicts your statment...
Me.RecordSource = "tbl_employees"

...unless the one is for the main form and the other for a subform.

Does the query "qry_weekly_employees" retrieve values for all fields in the subform? Do they use the same name?

The code does work. See recent post on issue...

...Moving on to the performance issue
Do you know where the bottle neck is that causes the performance problem?

Try working through the form, piece by piece to see the specific problem. Cut sections - subforms and code out. For example, the ON CURRENT event can fire of several times depening on the situation. Numerous combo boxes can also cause problems.

When Access loads a form, it retrieves the entire record set. One suggestion I have seen rather retrieving all fields in the table, just retrieve the bear minimum. Then as the end user scrolls through the records, the specific record is retrieved for the current pointer. For example, instead of retrieving the entire employee table, retrieve the employee number. Then use the employee number to retrieve the current employee record as you scroll through the records. This solution does require more work, and you may have to "play" to figure out if other fields such as the employee name are required.
 
Thanks for your suggestions! They helped alot. I had the subform name spelled wrong. I did use your suggestion concerning loading the form with minimum set of data.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top