Hello-
I am using dbPix for a batch download process. I want to include the filename itself in the tbatchload table when I import. However I cant seem to get it to work. I can get the Auto ID and OLE Object(Image) but cant seem to input the filename. Is there simple way to do this? My Table is this:
ID (Auto)
Picture(OLE Object)
Filename (This is where the pictures name would go)
Dim strSearchSpec As String
Dim strFile As String
Dim strFullPath As String
Dim strFolderName As String
Dim strCaption As String
strCaption = "Select folder to load images from"
strFolderName = BrowseFolder(strCaption)
If Not IsEmpty(strFolderName) Then
strSearchSpec = strFolderName + "\" + "*.jpg"
strFile = Dir(strSearchSpec, vbNormal)
While (Not StrComp(strFile, ""))
If Len(strFile) > 1 Then
strFullPath = strFolderName + "\" + strFile
DoCmd.GoToRecord , , acNewRec
ActiveXCtl0.ImageLoadFile (strFullPath)
End If
strFile = Dir
Wend
End If
I am using dbPix for a batch download process. I want to include the filename itself in the tbatchload table when I import. However I cant seem to get it to work. I can get the Auto ID and OLE Object(Image) but cant seem to input the filename. Is there simple way to do this? My Table is this:
ID (Auto)
Picture(OLE Object)
Filename (This is where the pictures name would go)
Dim strSearchSpec As String
Dim strFile As String
Dim strFullPath As String
Dim strFolderName As String
Dim strCaption As String
strCaption = "Select folder to load images from"
strFolderName = BrowseFolder(strCaption)
If Not IsEmpty(strFolderName) Then
strSearchSpec = strFolderName + "\" + "*.jpg"
strFile = Dir(strSearchSpec, vbNormal)
While (Not StrComp(strFile, ""))
If Len(strFile) > 1 Then
strFullPath = strFolderName + "\" + strFile
DoCmd.GoToRecord , , acNewRec
ActiveXCtl0.ImageLoadFile (strFullPath)
End If
strFile = Dir
Wend
End If