M
Michel Peeters
In Access 2002 I use the following code to open the file dialog box which
allows the user to pick out a folder.
With Application.FileDialog(4)
.AllowMultiSelect = True
.InitialFileName = "c:\foldername"
If .Show = True Then
Me![txtPath] = Left$(.SelectedItems(1), InStrRev(.SelectedItems(1),
"\")) & _
Right$(.SelectedItems(1), Len(.SelectedItems(1)) -
InStrRev(.SelectedItems(1), "\"))
End If
end with
This works ok.
Because the foldername in txtPath nearly never changes in my application, I
would like to create a command button which automaticly makes a string with
the name of the most recent file in the txtPath-folder , without opening the
filebox dialog.
Any idea how to start or where I could find it?
Michel
allows the user to pick out a folder.
With Application.FileDialog(4)
.AllowMultiSelect = True
.InitialFileName = "c:\foldername"
If .Show = True Then
Me![txtPath] = Left$(.SelectedItems(1), InStrRev(.SelectedItems(1),
"\")) & _
Right$(.SelectedItems(1), Len(.SelectedItems(1)) -
InStrRev(.SelectedItems(1), "\"))
End If
end with
This works ok.
Because the foldername in txtPath nearly never changes in my application, I
would like to create a command button which automaticly makes a string with
the name of the most recent file in the txtPath-folder , without opening the
filebox dialog.
Any idea how to start or where I could find it?
Michel