Pictures in Table (1 Viewer)

WKRJ

Registered User.
Local time
Yesterday, 22:38
Joined
Apr 19, 2012
Messages
11
Hi. I have a ton of scanned pictures on my computer. I was thinking I would build an Access database where I could create 3 or 4 indexed fields to fill in as time goes by. I would like to page thru the pictures and add the index fields a few a day till I'm done. The problem is that I don't know how to import 4-5 thousand pictures into a table. Would someone help me with this??

Thank You
WKRJ
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 13:38
Joined
May 7, 2009
Messages
19,231
importing pictures to table will increase your database size.
it is better to just import the path and file name of the pics to a text field.
put your pics in a permanent folder.
create a table with following structure:
Code:
tblPics


FieldName           Field Type          Comment

ID                        Autonumber
PicDesc               Short Text           Description of the pics
PicPath                Short Text           Path of the picture



in my sample there is a form, frmImportPics.
it will import the pictures, on the path you specified.


on the attached sample db, run Form1 to import the pics.
when done, importing run Form2 to view the imported pics.
 

Attachments

  • sampleImportPics.zip
    30.9 KB · Views: 90

WKRJ

Registered User.
Local time
Yesterday, 22:38
Joined
Apr 19, 2012
Messages
11
Thank You Very Much!

WKRJ
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 00:38
Joined
Feb 28, 2001
Messages
27,140
WKRJ

Arnel's advice is sound. Here is what you need to do to make your life easier. Do some reading on the subject of "File System Object" (FSO) and learn how to enable the "File Picker" dialog from it. You can search this forum and the web for all sorts of help on that.

Then you need a form that you can use to activate the file picker. Let's say you have a few folders set up. Let's also say that you have your pix in .JPG format. (Just sayin' for example purposes.)

You can set up a command button on your form that will run code when you click it. So you can write a subroutine using the FSO so that you can pick a folder. Then have the FSO find all .JPG files in that folder. For each one it finds, it can make a file-link entry to your table. You don't store the file. You store the file specification, which is typically a text string <128 bytes long. You have a file size limit of 2 GB. If you have a bunch of .JPG files each 40KB, you reach a limit of 25K pix. If you store names that are 1/8 KB long, you have room for a LOT more pointers.

OK, that was a bit of exaggeration, but the point is that your DB only has to store entries that are 1/8 KB long vs. 40 KB long if you just store pointers. Very efficient, allows you to organize your pix in multiple folders, and yet you can store descriptions and other things relevant to the picture in the table. You just don't need to store the picture itself.
 

Users who are viewing this thread

Top Bottom