Forms opening slowly

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a databse with forms that ar eused to chosse options to create a
fitness programme. The trouble is (still under constuction) the forms take an
age to open and close even when im working on construction. Some forms have a
lot of combo box options to make it easier to choose the data (up to 100 on
one form) how can I speed this up? I compact, have split the DB. Some days it
will open up staright away other days i have every other 1 not responding and
having to close the DB and go back in. Any ideas????

Paul
 
If you have 100 combo boxes and the row sources for them are queries then it
is no suprise it takes a long time to open. Even if they are tables, it will
still take a long time to open.
 
The sources for them are not queries but lookup fields in a table. Yet
sometimes they can open immediatley.
 
If you have to talk to the Jet engine, it is going to take a little time. If
you sometimes can open it quickly, then I would experiment to see if any
recordsets are already open when you open the form. It can be faster to
access data if there is already an attachment to the Jet engine. You will
sometimes see it suggested that maintaining a presistent attachement to a
table in your database will improve performance. That is, pick some table
that you really don't use that much, if at all, open a recordset to it when
you open the database, and leave it open until you close the database.
 
As you can tell Klatuu I am a novice writer. Could you please explain how I
can set this up and where do I add it to???

I take it this would leave the channel of communication between FE and BE
open to imrpove speed!!

Sory to be a numbskull
 
No problem, Paul. Your take is correct. Here is a simple plan:

Create a table in the back end. It only needs one row and one column.

I don't know what you open when you open your front end. If you have an
Autoexec macro, then add a line to it that opens the table. If you have a
form identified to open on startup, add code in the Load event to open the
table.

You can ignore it from that point on until you get to where you do a
Docmd.Quit. Just before the Docmd.Quit, put in a line to close the table.
(closing it is not absolutely necessary, but it is neat and tidy)
 
Sorry to be a pain, but where do i find the macro, in the code for the
switchboard which is my opening form? And also what would be the code to
insert. Im just getting to grips with the code side. Your patince is much
appreciated.

Paul
 
Paul,

Here is a line of code that opens a table:
Set rstPresist = CurrentDb.OpenRecordset("MyTableNameHere")
And to close it:
rstPresist.Close
set rstPresist = Nothing

To find out what is launching your Switchboard, look in two places. If you
have a macro named Autoexec, then Access will run it as soon as you open the
mdb. The other place to look is on the main menu bar under Tools->Startup.
The see if there is anything in Display Form/Page: If there is a form name
there, Access opens it when you open the mdb.
 
Back
Top