i have an ms access form based on a table which has 4 text fields named Image_Path1, Image_Path2, Image_Path3 & Image_Path4. On the form i have 4 command buttons to select the images and store their file path and image name in corresponding text field of table. i use the following code behind the command button
My Question is ...
how i can i use only one command button to select all the four images and store their file path and image in one go ?
The database is attachedhttp://www.4shared.com/s/fuhH73p7giq
Thanks
Code:
Dim f As Object Dim strfile As String Dim varItem As Variant Set f = Application.FileDialog(3) f.allowMultiSelect = True If f.show Then For Each varItem In f.selectedItems strfile = Dir(varItem) strfolder = Left(varItem, Len(varItem) - Len(strfile)) MsgBox "Folder" & strfolder & vbCrLf & "File: " & strfile Me.Image_Path1 = strfolder + strfile Next End If Set f = Nothing End Sub
how i can i use only one command button to select all the four images and store their file path and image in one go ?
The database is attachedhttp://www.4shared.com/s/fuhH73p7giq
Thanks