Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filename with cdlOFNExplorer

Status
Not open for further replies.

brandysoda

Programmer
Joined
Apr 14, 2003
Messages
9
Location
US
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.
 
In Addition...

When using cdlOFNExplorer, the path and filename is displayed when I select only one file. But when I select more than one file, only the path is displayed. Any thoughts?? Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top