H
hwdperk
I have an MS Access database which has a button with the following codebehind:
Dim dlgOpen As FileDialog
Set dlgOpen = Application.FileDialog(msoFileDialogFilePicker)
With dlgOpen
.Filters.Clear
.Filters.Add "All Files", "*.*"
.Filters.Add "Adobe PDF", "*.pdf"
.Filters.Add "Word Documents", "*.doc"
.Filters.Add "RTF Documents", "*.rtf"
.AllowMultiSelect = False
.title = "Please select File"
.InitialFileName = Application.CurrentProject.Path
.InitialView = msoFileDialogViewList
If .Show = True Then
...
...
If I click on the button, the file dialog opens as expected in the root of
the application. When another user clicks on the same button, they get a
message indicating that the folder location is not available - and the error
suggests that they are interpreting the Application.CurrentProject.Path as
being within the users My Documents folder. The only difference between us
is that we map to the location of the .mdb file differently - but I'm
assuming the Application.CurrentProject.Path should return the path as I (or
anyone else) is mapped to it.
Dim dlgOpen As FileDialog
Set dlgOpen = Application.FileDialog(msoFileDialogFilePicker)
With dlgOpen
.Filters.Clear
.Filters.Add "All Files", "*.*"
.Filters.Add "Adobe PDF", "*.pdf"
.Filters.Add "Word Documents", "*.doc"
.Filters.Add "RTF Documents", "*.rtf"
.AllowMultiSelect = False
.title = "Please select File"
.InitialFileName = Application.CurrentProject.Path
.InitialView = msoFileDialogViewList
If .Show = True Then
...
...
If I click on the button, the file dialog opens as expected in the root of
the application. When another user clicks on the same button, they get a
message indicating that the folder location is not available - and the error
suggests that they are interpreting the Application.CurrentProject.Path as
being within the users My Documents folder. The only difference between us
is that we map to the location of the .mdb file differently - but I'm
assuming the Application.CurrentProject.Path should return the path as I (or
anyone else) is mapped to it.