brandysoda
Programmer
Hi,
I have a problem with extracting filenames from the open dialog when I use the cdlOFNExplorer flag. The program works perfectly when I use the following code:
With Forms("fMenu".CD
.MaxFileSize = 4096
.Filter = "All Files|*.*"
If IsNull(fImport![Extension]) Then
.FileName = "*.*"
Else
.FileName = fImport![Extension]
End If
.DialogTitle = "Select File for Import"
.InitDir = fImport![Param 3]
.Flags = cdlOFNFileMustExist Or cdlOFNHideReadOnly Or cdlOFNAllowMultiselect
.CancelError = True
.ShowOpen
MyString = .FileName
MsgBox " The Files are " & .FileName
..
..
..
The message box displays both the directory and the selected files.
However when I add cdlOFNExplorer to the flags, the message box displays only the directory. I need the filenames for further processing.
I am using Access 2002 or 2002 runtime.
Can anyone shed light on why this is happening ? Thank You.
I have a problem with extracting filenames from the open dialog when I use the cdlOFNExplorer flag. The program works perfectly when I use the following code:
With Forms("fMenu".CD
.MaxFileSize = 4096
.Filter = "All Files|*.*"
If IsNull(fImport![Extension]) Then
.FileName = "*.*"
Else
.FileName = fImport![Extension]
End If
.DialogTitle = "Select File for Import"
.InitDir = fImport![Param 3]
.Flags = cdlOFNFileMustExist Or cdlOFNHideReadOnly Or cdlOFNAllowMultiselect
.CancelError = True
.ShowOpen
MyString = .FileName
MsgBox " The Files are " & .FileName
..
..
..
The message box displays both the directory and the selected files.
However when I add cdlOFNExplorer to the flags, the message box displays only the directory. I need the filenames for further processing.
I am using Access 2002 or 2002 runtime.
Can anyone shed light on why this is happening ? Thank You.