Recordset as a datasource for a form

petko

Registered User.
Local time
Today, 11:04
Joined
Jun 9, 2007
Messages
89
Hi,

I have an accdb file, holding all the tables on my server. Clients are linked to this one from their workstations. Speed is a constant issue mostly when more users are linked and I'm trying to find ways to make things faster.

Would it be possible to open a recordset when a form is loaded and set it as the form's data source? Would that make operation faster, at all?
The reason this idea came up is that it would be logical to use a small size recordset rather than large tables or queries that takes a while to load during starting form that use tables/queries with large number of records.

Please let me know if this could work and if so, how.

Appreciate any feedback

Peter
 
Dear CJ_London,

Thanks a lot for your feedback.
Speed is a big issue (I guess) but what I would like to know particularly if it is generally possible to set a recordset as a data source for a form?

Appreciate your help

Peter
 
Code:
Set Forms!formname.Recordset = rsWhatever

However if you just want to open with a small recordset you could simply use a query as the RecordSource.

The only place I have found using my own recordset as the form's recordset makes a dramatic speed difference is in subforms populated from large tables in SQL Server. The recordset is loaded from a Stored Procedure using the OnCurrent event of the main form.
 
If you want to load the same amount data as before, then I don't quite see the point of adding the recordset first after opening the form.

The one occasion when such procedure saves time is lazy loading subforms in tabs: if you have a tab control with subforms that take time to load, it may show something much quicker if you only load the subform of the tab that is open, and load the next one first when switching to that tab.
 

Users who are viewing this thread

Back
Top Bottom