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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Preloading Queries

Status
Not open for further replies.

tbaguio

Programmer
Sep 25, 2000
41
CA
I don't know if this is possible but I wanted to know if Access can preload specific queries on startup. This is help aid load times of some of our forms which have rather large recordsets. There must be some sort of On StartUp event or preload command for the database.

Theresa "Sleep is the best meditation." - Dalai Lama
 
By using a startup form, usually some kind of "splash" screen, and its Open event, you could run some code which set your recordsets, defined as global variables, to query datasets, I guess.

I have never tried it, but it should work. Let me know if you need more detail.

Kathryn


 
Seach for Startup in the help files or right click on the top of the form header for the database window and select properties. The startup properties will be displayed and they are relatively obvious.

Steve King Professional growth follows a healthy professional curiosity
 
Load all the queries you want. It won't help (In Fact, IT will slow down the loading). Little old Ms. Access is quite particular about the recordsets for forms/reports ...

[red]Each Time[/red] you load/activate an object in Ms. Access, it will refresh it's anticedents, back to the basic TABLES.


MichaelRed
redmsp@erols.com

There is never time to do it right but there is always time to do it over
 
How large are your recordsets? Do you really need recordsets that large? Your best course of action would be to reduce the size of your recordsets.

The only way to get around the problem posed by MichaelRed is to use disconnected ADO recordsets and batch updates, but you really have to know what you're doing with ADO to do that.

I'd strongly recommend you review the need to have such a large recordset.

Regards,
Peter
 
I'm not sure if I understand, but you can try to put all the startup commands on the macros with the name 'autoexec'. If you do not have it, you should create it. John Fill
 
Loading a recordset is Loading a recordset is Loading a recordset is ... Wheather is is RDO, DAO, ADO - or anything short of MAGIC, loading it is loading it. Put it (the loading process) anywhere you want it will take the time it takes. Loading it more often just means loading it again!


MichaelRed
redmsp@erols.com

There is never time to do it right but there is always time to do it over
 
Thanks for all your responses. They were all very helpful and informative.

Unfortunately, at this point there is no way around our large recordsets. We are planning a point in time soon where we archive off our records to a specific date... but until then, they will remain large.

I was hoping to have the long load time on the opening of the database, rather than each individual form, to give the appearance of improved performance for our users. But it looks like it is only wishful thinking.

At least this will be a good excuse to fast track our migration to SQL.

Theresa "Sleep is the best meditation." - Dalai Lama
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top