Chdir before Filedialog

  • Thread starter Thread starter Maarten
  • Start date Start date
M

Maarten

I have copied the example from MS-Access 2000 for the
filedialog (in order to allow users which file to select)
but the file directory is not 'my documents'. Therefore I
change the directory via the ChDir method: eg. ChDir
("c:\bitmaps")

Then I execute the coding as in the help example, but the
initial directory remains 'my documents'. Via debugging I
can see that CurDir = C:\bitmaps. So what can I do more
to secure that my filedialog opens with this directory?

Appreciate your support.
 
Hi Maarten,

Are you sure you copied this from an Access 2000 example? I believe the Filedialog
property was introduced in Access 2002....

Try using the .InitialFileName property

Dim fDialog As Office.FileDialog

With fDialog
'Set the initial directory
.InitialFileName = "C:\Temp\"

' Other code goes here
End With


Tom
_____________________________________


I have copied the example from MS-Access 2000 for the
filedialog (in order to allow users which file to select)
but the file directory is not 'my documents'. Therefore I
change the directory via the ChDir method: eg. ChDir
("c:\bitmaps")

Then I execute the coding as in the help example, but the
initial directory remains 'my documents'. Via debugging I
can see that CurDir = C:\bitmaps. So what can I do more
to secure that my filedialog opens with this directory?

Appreciate your support.
 
Back
Top