ParaTrooper
Technical User
Hi Everyone,
I am developing an Access 2000 DB where the users need to update the data in a linked table (text file) by selecting the most current file on a network drive.
The path of the most current file is not always the same, nor is the name. I have overcome this by copying the most current file to a temporary location and giving it a common name (the linked table is linked to the temporary file).
My only problem is how do I prompt the users to select the most current file? How do I get an Open File dialog box to pop up that returns the full path of the file the users select?
I have done this before in excel, and the only solution I have come up with in Access is to use an excel application object as so:
Dim tempFile As String
tempFile = "C:\windows\vehicle_regestration.txt"
Dim ex As Excel.Application
Set ex = New Excel.Application
Dim fileToOpen As String
fileToOpen = ex.GetOpenFilename()
If fileToOpen <> "False" Then
'//Place copy on local drive
copyFile(fileToOpen, tempFile)
End If
Thanks in advance for your help,
ParaTrooper
I am developing an Access 2000 DB where the users need to update the data in a linked table (text file) by selecting the most current file on a network drive.
The path of the most current file is not always the same, nor is the name. I have overcome this by copying the most current file to a temporary location and giving it a common name (the linked table is linked to the temporary file).
My only problem is how do I prompt the users to select the most current file? How do I get an Open File dialog box to pop up that returns the full path of the file the users select?
I have done this before in excel, and the only solution I have come up with in Access is to use an excel application object as so:
Dim tempFile As String
tempFile = "C:\windows\vehicle_regestration.txt"
Dim ex As Excel.Application
Set ex = New Excel.Application
Dim fileToOpen As String
fileToOpen = ex.GetOpenFilename()
If fileToOpen <> "False" Then
'//Place copy on local drive
copyFile(fileToOpen, tempFile)
End If
Thanks in advance for your help,
ParaTrooper