Thread: Adding Attachments with VB?
03-30-09, 08:49 #1Registered User
- Join Date
- Mar 2009
Unanswered: Adding Attachments with VB?
Good Day All,
I am very new to this, I have recently acquired Access 2007. I created a DB for viewing images according to Stock Codes.
The images are all in .jpg, and renamed to a Stock Code.
My Table that I created has a field for the Stock Code and for the Image as an attachment.
At the moment I am adding each and every one manually and there are only 11000 to do.
Is there perhaps a code by which I can do it faster?
Thank you all in advance
03-30-09, 11:13 #2Moderator
- Join Date
- Dec 2004
- Madison, WI
When I've done coding like this to populate a picture into an OLE Object type field, I found it was easier to automatically insert a *.bmp file into the table itself. (But that was a while back and *.jpg files "may" or "may not" work/be easier.)
Basically though, the code involved reading the folder where all the pic files were located and having the pic location/file name inserted into a table (similar to the "MainMenuSystem" example in the code bank.) Once this was done, I made an update type query to add the pics into the main db (and to the correct record ID). It got a little complex but someone else might have a better suggestion on accomplishing what you want to do.Expert Database Programming
MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)