Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding additional Info in Record 1

Status
Not open for further replies.

fergy1

IS-IT--Management
Jul 25, 2003
32
US
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
 
Hi,

dbPix? I don't believe that it's included in Ms Access.

What is it?

Regards,

Darrylle

Never argue with an idiot, he'll bring you down to his level - then beat you with experience. darrylles@yahoo.co.uk
 
DBPix is an OCX Driver from amarra.com. But more important than what I'm using, and I apologize for the confusion is how to add the string value for the name of this file. It grabs it now as an OLE object in the database from a directory. The following is a link to download the sample.

 
Have tried something like this ?
DoCmd.GoToRecord , , acNewRec
Me![name of FileName control] = strFullPath
ActiveXCtl0.ImageLoadFile (strFullPath)


Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks PHV, New to Access Modules and VB so this was helpful.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top