Relationship between MDB file size and amount of VBA used

D

Dan Wieland

I have a general question about the impact on MDB file size, when using
Visual Basic embedded in forms. I am a beginner and am incorporating error
checking and automated functions with Visual Basic behind my forms.
Beginning with a new database and importing my data, I had an MDB file that
was 1.6MBytes. After adding some forms and about 100 lines of code total
(spread across 12 subroutines), the file size has exploded to 14.4MB. Is
this normal? I haven't added any additional data to my tables. Just
commented code, forms, and some queries.

Is there a way to determine what part of my MDB file is being the memory hog?

If this is normal, I can see that my routines need to be very efficient.
Thanks in advance.
 
J

James Franklin

I have a general question about the impact on MDB file size, when using
Visual Basic embedded in forms. I am a beginner and am incorporating error
checking and automated functions with Visual Basic behind my forms.
Beginning with a new database and importing my data, I had an MDB file that
was 1.6MBytes. After adding some forms and about 100 lines of code total
(spread across 12 subroutines), the file size has exploded to 14.4MB. Is
this normal? I haven't added any additional data to my tables. Just
commented code, forms, and some queries.

Is there a way to determine what part of my MDB file is being the memory hog?

If this is normal, I can see that my routines need to be very efficient.
Thanks in advance.

Try compacting the database.
 
M

Marshall Barton

FYI The forms and report take up a most of the additional
space. The code counts for only a small part of it.

While you are working on your forms, reports, etc. you
should back up the mdb file(s) frequently. Immediately
after verifying that the back up copy is good, Compact the
database and then continue developing your application.
 
D

Dan Wieland

Thanks Marsh. Appreciate the recommendations.

Marshall Barton said:
FYI The forms and report take up a most of the additional
space. The code counts for only a small part of it.

While you are working on your forms, reports, etc. you
should back up the mdb file(s) frequently. Immediately
after verifying that the back up copy is good, Compact the
database and then continue developing your application.
--
Marsh
MVP [MS Access]


Dan said:
Wow! That's it. Back to under 2MB. Excellent! Thanks for the tip.
 
S

salex

First create shortcut to your app: "MSAccessPath" "YourApp" /decompile.
Then try "compact and repair" from menu, or check
Tools-Options-General-Compact on close.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top