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

Filelen with Access2007

Status
Not open for further replies.

MJD1

Technical User
Jul 18, 2003
134
CA
Hello, i know this is probably an easy one, I just can't see where i'm going wrong. I recently converted an Access 2003 application to Access 2007. For the most part, the conversion went well, except for a few codes that I was able to fix. The below worked perfectly with 2003 and now doesn't work. I'm just not sure how I need to fix it. the expected value is the size of the db backend.

=((FileLen("P:\Public\StoreOps\Eastern Canada\Loss Prevention\NVR\nvrdata\NVR Quarter 2 2009_be2.mdb"))/1000000)

the value returned is "#name?"


any help is appreciated!

cheers
 
I knew it was too easy...I figured it out.

rather then having the code in the control fieldof the textbox, I added the following to the On open event of my form.

Dim backend as string
backend = "file path"
Text94= (filelen(backend)/1000000)

 
hi, thanks...lol...I couldn't remember the correct value to use and accuracy in this case wasn't to important...I just wanted to get an idea of the size of the Backend as it gets updated daily. This way i can compact when necessary.
 
accuracy in this case wasn't to important

I guess the user's not going to know the difference. They'll be getting consistent numbers and that's all that matters.

I only asked because I like asking that question of storage salesmen. They always bump up their figures by assuming 1,000,000 bytes to the megabyte.

Geoff Franklin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top