How to populate a combobox with multiselect filepicker results, then save results? (1 Viewer)

brucemc777

Member
Local time
Today, 16:59
Joined
Nov 1, 2012
Messages
88
Good Morning and thank you for considering my issue!

On a form i have a combobox.

From the combobox only one selection is made at a time. This, in turn, displays a picture.

I wish to populate that combobox's values with the return results from calling a multiselect file dialog (Function f_SelectImages; returning a vbCrLf separated file with the file locations (OK, so that was kind of obvious...)):

Code:
'User either picks a file or presses"Cancel"
          If .Show Then
               If .SelectedItems.Count = 0 Then
                    GoTo SubExit
               End If
             
               For Each vFile In .SelectedItems
                    sSelectedName = sSelectedName & vFile & vbCrLf
               Next
               f_SelectImages = sSelectedName
          Else
               MsgBox "You clicked Cancel in the file dialog box."
               Set fDialog = Nothing
               GoTo SubExit
          End If

and the three files i selected for output, shown when i type
Code:
? sSelectedName

in the Immediate window being:

D:\Documents\Pictures\000000--000000-002 (1).JPG
D:\Documentsl\Pictures\2002-03-24-17h28m36.JPG
D:\Documents\Pictures\2002-03-24-17h28m46.JPG

Code obtained from Access Jitsu.

1) How do i take that return file and make those items the combobox's value list?
2) Can this be done in a way that the combobox will store those values until someone runs the filepicker again to repopulate the combobox?

As ALWAYS, many thanks for you folks being out there to guide me; without you i would be lost.
-Bruce
 
Since you seem to suggest cross-user functionality, I would store the file names in a small table.
 
Interesting and thank you. I find lately when my mind gets an idea i frequently do not consider the alternative methods of achieving the result until i run into a brick wall. I get those values from the file picker, i store them in a table along with the order number. Every time the form comes up i reload the combobox with the locations from the table that the order number is the same for.

Sorry for the delay, i'm just kind of slow with this and am now trying to implement; just about to work out how to take the filepicker return and INSERT INTO the image table. I have the combobox and display frame working fine!
 

Users who are viewing this thread

Back
Top Bottom