File Size

S

Shell

In Access 2000, how do I monitor in code the size of the current mdb file as
it grows during processing?

Thanks
 
R

RonaldoOneNil

This will tell you how much you have left before reaching 2 gig
MsgBox 2000 - Int(FileLen(CurrentProject.FullName) / 1000000)
 
P

Peter Hibbs

Try :-


Dim lngSize As Long
Dim strFileName As String

strFileName = Application.CurrentProject.FullName
lngSize = FileLen(strFileName)


Having said that, if you have not split the database then you should
when you have completed the design. You could then monitor the
back-end size (if you need to), the front-end size should not really
change that much.

HTH

Peter Hibbs.
 
S

Shell

The code looks easy enough. I will try it.

I thought that the FileLen command only gave the file size before bloating.
That is, the result of the code would be file size when opened.
 
P

Peter Hibbs

The FileLen function returns the size of the file on disk which may
not be the size of the same file in memory. Obviously an Access file
usually writes data back to disk during use so the file size will
almost certainly be different the next to you try it.

If you need the size of an open file you could perhaps use the LOF
function, check Help for details.

Peter Hibbs.
 

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