Working with pictures

E

Erwin & Chris

Hello

We want to create a database where we can store an items information with a
picture. Already set up a database where the pictures got embedded in. The
problem that we found is that the size of the database is increasing a lot.
We got around 500 items and 20MB of pictures, the database size grow up to
750MB. Also we read somewhere that access only deals with maximum 1GB mdb
files!? Is this true and the same in 2007?

Does anybody got a good idea to work around this problem? At the moment the
db is setup so we can drag and drop the pictures from windows explorer into
the database.

Kind regards
Erwin
 
E

Evi

Don't store your pictures in your database. Store them in a folder and
provide the file path to the folder in a text field in your database.

Here's a step by step which works with previous versions of Acc

(the instructions may be slightly different for Acc2007 and it would be
very helpful if you could edit these instructions, if necessary for 2007
users)

Create a table TblImge with

ImageID (Autonumber, Primary Key),

ImgPath, (a text field)

ImgName (a text field)



ImgPath contains the path to the folder that contains your images eg
E:\Downloads\EvsPhotos\Students\

If this is the same path for most of your photos then you can set it as the
Default Value of the ImgPath field in your Table Design View

ImgName has the full name of your picture/photo, including the file
extension. eg

John.jpg



Keeping path and name separate will be helpful if you every need to move
your photos.

The first record in your TblImage will contain the file path to the default
picture (or clipart) which you want to use if you don't have a picture for
anyone.

Add the photo paths and filenames to this table. (if you have a lot of
pictures there is code which can help you to do this)



In your table which has eg Students add the Number Field ImageID

Make its Default Value the ImageID number of your default image (probably 1)



If you have lots of records in your table already, you could use an Update
Query to update this field to 1 until you have matched student and picture



In the query on which your report or form will be based, as well as the data
from eg your Students table, add ImgPath and ImgName. In an empty column in
the query (in Design View) type

PicPath: ImgPath & ImgName

(this will join the ImagePath and File Name together)

In your report, in Design View go to Insert, Picture. Choose any picture or
clipart to start with - it doesn't matter.

Size the frame to the size you want it to be.

Click the the newly inserted frame, click on Properties

On the Format tab, next to Picture, delete the file path next to Picture.

Choose Yes - you want to delete the picture.

Next to picture, it will now say (none)

Your Image Frame will remain as a white square. On the Other tab next to
Name type Pic1

Next to Size Mode choose Zoom.

Click on the grey bar above above the section which holds your picture
frame.



In Properties, click on the Events tab and next to On Format. Choose Event
Procedure.

Click just right of that to open a code page

In the code page just above where it says End Sub put

Me.Pic1.Picture = Me.PicPath



Evi
 
D

Dale Fye

It looks like you are new to using these newsgroups, so I'll provide a little
free advice (I will be worth at least what you paid for it).

It is rarely necessary to post to more than one newsgroup (multi-posting),
but when you feel the need, you should post the same message to each group
with one message and multiple newsgroups listed on the To line (this is
called cross-posting).

The disadvantages of multi-posting are:

1. You have to type your message twice
2. You have to look in multiple locations for the responses
3. You waste the time of developers who are trying to help you, because
they have no way of telling when someone else has already answered your post.

The advantage of cross-posting (only when absolutely necessary):

1. You only have to type your message once
2. You only have to look in one place (either group) for the responses
3. You don't waste anyone elses time (VERY IMPORTANT)!

HTH
Dale
 
E

Erwin

Hi Dale

Indeed we are new to using newsgroups. I'm sorry for any inconvinence. Thank
you very much for the information.

Kind regards
Erwin
 
D

Dale Fye

Erwin,

It's an etiquette thing, kind of like not using all caps, but it really does
save those that want to help time.

Hope you enjoy these groups. They are full of great information and really
helpful comments.

Good luck!

Dale
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top