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

Speeding up Access 1

Status
Not open for further replies.

wbwillson

Technical User
Oct 7, 2002
52
GB
I'm trying to speed up my access database. I have a lot of VBA code as well as lots of inserted JPGs. Is there a way I can load all of my graphics files at the very start of the database? I'm thinking if I make the end user wait a bit at the beginning, it will be better than making them wait every time a new form is opened. Any others ideas how to speed things up..I'm going to compact the database on a regular basis and eventually make it an MDE file (if I ever finish it). Thanks for any suggestions and Merry Christmas to all!

Bill
 
Hi Bill,

By "inserted" do you mean embedded? Linking is much more efficient, but means having copies of the images locally on all user's PC's.

Whether they are embedded or linked images, you could create a hidden form that loads at startup, this will certainly speed loading times of subsequent forms.

On the form's that have images the code would go like this in the form's on load event:

Me!MyImage.PictureData = Forms!MyHiddenFormName!MyImage.PictureData

You would of course, have do do this for all your images, but would be well worth it, if you want to speed things up.

Another thing is, Access doesn't handle images very well in general, but certainly doesn't like jpeg's. Using Paint Shop Pro or similar software, try converting your images to Bitmaps. Bitmaps are many times larger than jpeg's, but Access uses approximately the same amount of file space to store one. Also converting to Bitmaps will stop the annoying "Loading" message that you get with jpeg's.

Running the Performace Analyzer to check that your tables are properly indexed can greatly improve performance as can setting ControlSources and RowSources at Runtime, not at Design Time.

Anyway, have a great holiday.

Bill
 
I have a question about this, how is linking much more efficient? My front end is about 17 mb's. This is because i have embedded all the pictures i use in the db, rather then linking them. I haven't found any performance loss from doing this. The only thing is, the db is larger about 10mb's larger. I don't care if its larger though, because theres no performance difference. Do you think i'll be running into problems later? To recap, what do you mean by efficient?
 
1. Linking to an image is much more efficient than embedding, memory wise. Try creating a new DB. Add a form, add an image. Save it first with the image Embedded. Compact the new DB. Look at its size. Open the DB, then the form, change the Picture Type to Linked. Save, Compact. I just tried this on an existing DB with a 52k jpeg. Embedded my database size grew to 1,792kb, Linked it shrank to 336kb.

2. With your current setup, it depends on how much RAM your client's have and what applications thry're going to run concurrently with your app. But it sounds to me that you're using a big chunk of memory unnecessarily.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top