FileDialog default to Application.CurrentProject.Path

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.
 
O

OssieMac

Check the other persons permissions to the folder. Could be that they have
permission to the application in the folder but no permission to
view/select/open other files in the folder.

Easy way to do this from their computer is to navigate to the folder with
windows explorer and test whether they can see the file list and whether they
can open any other files in the folder.
 
H

hwdperk

I have confirmed the user has fill rights - list, read, write, update, delete
- she would appear to have full permissions to the folder, content and
sub-folders.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top