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!

Memory/Speed Question

Status
Not open for further replies.

briandh

Programmer
May 29, 2002
20
US
I have a question about how MS Access 2000 uses memory.
I am running a database with about 150 records. My main form has a LOT of controls on it - and about 3 or 4 subforms too. I am expecting the form to take a little while to load with that many controls. But I noticed something about it the other day.
I looked at MSAccess.exe in the Task Manager, and when I open my main form, the memory used jumps up to about 12,000k. The form takes about 7 seconds to load. BUT, when I set the database attributes to Read-Only (from windows), the main form loads instantly, and still uses about 12,000k of memory.
The database is only updated by one person - most of the users will be using it to look up data and print reports. I am not using the Access user-level security.
My first question is why does the form take so much longer to load when it is not read-only? I am not complaining about this - I expect it to take some time to load - I am just curious as to why it loads so much quicker when it is read only.
My next question leading off of the first one is this: Can I make my database not do whatever it is doing that causes it to take so long to load? If making it read only is the only way to do this, is there a way to open the database read only or not? Can I do this with shortcuts? I could make a copy of the master DB for the read only users, but the person who will be updating the master from time to time does not know how to make things read only and copy files or anything like that.
Any suggestions? If not, I am fine with letting the form take a while to load - I just thought it would be nice for the users since it is possible to load instantly to make that possible for them.

Thank you for your help!

Brian
 
Assuming that you must open the form in read only mode, perhaps a way to do it would be wiht a splash screen the had a transparent textbox which only the person who needed to write would know about. set the on click event of this screen to set a global variable to some value.

all calls to the form first check this global. if it has not been set, the form opens in the read only mode.

don't know if there's an "official" way to speed things up, but this would be a way if there isn't.
 
You can start your database from a shortcut and include /ro in the command line to open in read-only mode.
Ex:
"C:\Program Files\Microsoft Office\Office\MSAccess.exe" "C:\Program Files\Microsoft Office\Office\Samples\db1.mdb" /ro
will open this in read-only.





Rhonin
"too many questions, too little time..."
 
Thank you very much for your suggestions - I will try them both!
I still don't know if I will be able to use shortcuts, but I will definitely try that one!

Thanks again!

Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top