Importing Picture directly into Access

  • Thread starter Thread starter jaybees20
  • Start date Start date
J

jaybees20

Guest
Hi,

I was wondering if anyone can help, I am relatively new to access and don’t understand many terms, so please bear with me!

I am trying to create a database that, from a form, can show me the files of pictures that are stored on a digital camera that is linked to the computer via USB. I need to download the pictures, view them, select the one I require (perhaps via a thumbnail) and either store it in the database or store a link to the photo.

Can any of this be done? If so any help on the problem will be great. Even if it is just to show me how to import a picture / reference to picture.

Thanks, and thanks in advance, :)

Regards,


Jaybees20
 
You need VBA abilities to do this. Don't import the picture to the DB. All that will do is bloat the DB. Import the picture to a picture folder.

In a table, you want the name of the picture file and any other info you need on the picture file. Comments, date, subject, sequence number, whatever you are using.

On your picture-viewing form, build an unbound IMAGE CONTROL but bind the rest of the form to the records holding your picture file spec. (I.e. device, path, name, type).

In the form's FormCurrent event, you would use VBA to take the picture file spec from the current record and copy that to the image control's Picture property. You might have to play with the image control properties a bit to control Zoom/NoZoom, Tiling, aspect ratios, etc. But most of those can be set statically and it is OK to experiment. You DON'T want to embed the picture in the DB (which is one of the properties). You want to let Access use the file name to FIND the picture each time you change the form.

The rest of what you want to do can be managed pretty easily if you know the name of the file (and know that it is a separate file from all other pictures.)
 
"you would use VBA to take the picture file spec from the current record and copy that to the image control's Picture property"

I did ask for a reason =) hehe
 
Thanks for the help, i know very little VB though, I can read and do very small alterations to it. Do you know where i can perhaps get some sample VB that can do this action that i can perhaps tailor to my database.

Cheers
 

Users who are viewing this thread

Back
Top Bottom