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!

SQL and ADP, form loading Dilemma

Status
Not open for further replies.

Zirak

MIS
Feb 3, 2003
164
US
I have an ADP fornt end and a SQL Server backend.
When I opend the forms bound to SQL Server tables, it took a while till the form loadded, specially in the remote offices and on the forms with thousands of records it was very slow.
To solve that problem I set an event on the "on open" property of my forms :"DoCmd.GotoRecord,,acLast.
This way when the form opens it will directly go to the last record and the form loads much faster.
I don't understand why? In both cases all records are available, why is it faster when SQL goes to the last record.

This also solved another problem that I had. I have a button on my forms that will open and find data on another forms based on a value on the original form. This would first open the target form, clone its recordset and then find a record in the cloned recordset and the using the bookmark method find that record on the form, but it was solved when I set the on open property to go to the last record.

Does anybody know why?

 
Thx for your imput on the goto.last It works here too - I have been batteling all day.

Looks like you have the solution and I know why....

SQL only loads 50-100 records when opening the form, this is to save time .....
I found out by stopping the code and then it workes like a charm but on running the code the form would allways start on record 1 :-(

As your Q is some time old you may allreaddy know this but if not this is why.
Thx again saved my hair/day ;-)

Herman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top