thread705-1678760
Hi,
I am using this thread database but I don't know how to import multiple images to multiple columns. Can please help on that. I want to import 300 images daily and show this images as grid like thread database. I am using this code to insert images which is imported images from my computer.
Public Sub LogPictureFilesToDatabase(sFolderPath As String)
Dim sFileName As String
Dim sAccountName As String
sFileName = Dir(sFolderPath & "\", vbDirectory)
Do Until sFileName = ""
Select Case LCase(Right(sFileName, 4))
Case ".jpg", ".gif", ".bmp"
sAccountName = sFolderPath & "\" & sFileName
DoCmd.RunSQL "INSERT INTO tblImg (Img) VALUES (""" & sAccountName & """)"
Case Else
'Ignore other file extentions
End Select
sFileName = Dir 'Get next file
Loop
End Sub
Thanks
Sajjad
Hi,
I am using this thread database but I don't know how to import multiple images to multiple columns. Can please help on that. I want to import 300 images daily and show this images as grid like thread database. I am using this code to insert images which is imported images from my computer.
Public Sub LogPictureFilesToDatabase(sFolderPath As String)
Dim sFileName As String
Dim sAccountName As String
sFileName = Dir(sFolderPath & "\", vbDirectory)
Do Until sFileName = ""
Select Case LCase(Right(sFileName, 4))
Case ".jpg", ".gif", ".bmp"
sAccountName = sFolderPath & "\" & sFileName
DoCmd.RunSQL "INSERT INTO tblImg (Img) VALUES (""" & sAccountName & """)"
Case Else
'Ignore other file extentions
End Select
sFileName = Dir 'Get next file
Loop
End Sub
Thanks
Sajjad