CharlieT302
Instructor
Hello,
I would like to have my combo box display a list of files from a folder that resides on a SharePoint drive. I have done this with files residing in network folders without a problem, but apparently the combo box is not reading the SharePoint site in the same manner.
Here is my current code (using the OnLoad event)
Note:
Image_Select = Combo Box
StrFolder = the field containing the path (the URL, in this case -
List_files: 'List Files - Update List
Me.Image_Select.RowSource = ""
Dim StrFolder As String
Dim StrPath As String
Dim PictureSubfolder As String
StrFolder = DLookup("Parent_Pic_Path", "tbl_Picture_Paths") 'assigns the root folder
StrPath = StrFolder
PictureList = Dir("StrPath", vbArchive)
Do While Len(PictureSubfolder) > 0
' Ignore directories
If (PictureList <> ".") And (PictureList <> "..") Then
Image_Select.AddItem PictureList
End If
PictureSubfolder = Dir
Loop
My only other option is to use a file dialog box, which I am O.K. with except that the above allows me to point to the location of the images without requiring any navigation.
All help is appreciated.
I would like to have my combo box display a list of files from a folder that resides on a SharePoint drive. I have done this with files residing in network folders without a problem, but apparently the combo box is not reading the SharePoint site in the same manner.
Here is my current code (using the OnLoad event)
Note:
Image_Select = Combo Box
StrFolder = the field containing the path (the URL, in this case -
List_files: 'List Files - Update List
Me.Image_Select.RowSource = ""
Dim StrFolder As String
Dim StrPath As String
Dim PictureSubfolder As String
StrFolder = DLookup("Parent_Pic_Path", "tbl_Picture_Paths") 'assigns the root folder
StrPath = StrFolder
PictureList = Dir("StrPath", vbArchive)
Do While Len(PictureSubfolder) > 0
' Ignore directories
If (PictureList <> ".") And (PictureList <> "..") Then
Image_Select.AddItem PictureList
End If
PictureSubfolder = Dir
Loop
My only other option is to use a file dialog box, which I am O.K. with except that the above allows me to point to the location of the images without requiring any navigation.
All help is appreciated.