MS Access: FileLen Function
In Access, the FileLen function returns the size of a file in bytes.
The syntax for the FileLen function is:
FileLen ( file_path )
file_path is the path to a file name that you wish to retrieve the size for.
For example:
FileLen ("C:\instructions.doc") would return 55808 FileLen ("H:\Documents\Supplies.xls") would return 1254
VBA Code
The FileLen function can be used in VBA code. For example:
Dim LResult As Long
LResult = FileLen ("C:\instructions.doc")
In this example, the variable called LResult would now contain the size of the instructions.doc file in bytes.
SQL/Queries
You can also use the FileLen function in a query.
