Common Dialog

  • Thread starter Thread starter Ronald Gibson
  • Start date Start date
R

Ronald Gibson

I calling the common dialog from my form. I want to select multiple files
and create unique records for each file selected. Are there any suggestions
that could help me out.


Ron
 
When you select multiple files, they come back in a special form, with the
path first, then a Null character (Chr(0)), then the name of the first file,
then a Null character, then the name of the next file, then a Null
character, and so on. There will be 2 Null characters at the end.

Assuming you're using Access 2000 or higher, you can utilize the Split
function to decipher this. Let's say you've got what's returned in a
variable strReturn

Dim lngLoop As Long
Dim strFiles As String()

strFiles = Split(strReturn, Chr(0))
For lngLoop = 1 To UBound(strFiles) - 2
Debug.Print strFiles(0) & strFiles(lngLoop)
Next lngLoop
 
Back
Top