File Size

  • Thread starter Thread starter Shell
  • Start date Start date
S

Shell

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

Thanks
 
This will tell you how much you have left before reaching 2 gig
MsgBox 2000 - Int(FileLen(CurrentProject.FullName) / 1000000)
 
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.
 
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.
 
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.
 
Back
Top