sarah_anne
Registered User.
- Local time
- Today, 12:07
- Joined
- Jul 29, 2005
- Messages
- 17
I've been searching for a way to access when my .mdb file was last modified (going to put it in a label on my startup form), and came across this: http://www.access-programmers.co.uk/forums/showthread.php?t=72721&highlight=file+modified
In that thread, FileDateTime is used:
MsgBox FileDateTime("Y:\i-spectra\working\dev\vc\db\VesselConfiguration.mdb")
... would therefore be for mine. And it works great.
However, my .mdb file will move around with various people, and one day it'll be on one drive letter, another day it'll be on another drive, which makes it impossible to specify the exact location of the file. They also might rename it to something else sometimes!
I thought MsgBox FileDateTime("VesselConfiguration.mdb") might work, but it doesn't.
1) is there any way of using FileDateTime without specifying a path to the file?
2) how do i get the name of the current file then also?
Ideally, my statement would look like:
MsgBox FileDateTime("[filename]")
... i.e. not giving a path OR a hard-coded filename.
How can this be done, please?

In that thread, FileDateTime is used:
MsgBox FileDateTime("Y:\i-spectra\working\dev\vc\db\VesselConfiguration.mdb")
... would therefore be for mine. And it works great.
However, my .mdb file will move around with various people, and one day it'll be on one drive letter, another day it'll be on another drive, which makes it impossible to specify the exact location of the file. They also might rename it to something else sometimes!
I thought MsgBox FileDateTime("VesselConfiguration.mdb") might work, but it doesn't.
1) is there any way of using FileDateTime without specifying a path to the file?
2) how do i get the name of the current file then also?
Ideally, my statement would look like:
MsgBox FileDateTime("[filename]")
... i.e. not giving a path OR a hard-coded filename.
How can this be done, please?