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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top