How to Add A
Picture (or Video/Sound Clip) to an Access database.
As mentioned in class Access databases can contain
different types of files in addition to numerical and text data. The only trick
is to understand the different data types in Access.
Step One – Open up the table (in design view) that you wish
to have contain the picture file –and you will have to create the field. To do
this just type the name of the file and select OLE for the Data Type. OLE
stands for Object Linking and Embedding—which is exactly what you will be
doing.
Upon Completion Click on Datasheet view, you will be
prompted if you wish to save the table first—YES YOU DO, otherwise your change
will not be made.
At this point your screen should look like this:
IMPORTING THE PICTURE
Now the next step is to place the picture into the
database. There are only two things that you will need to know to be successful
in importing the picture. You will need to know the file type and the location
of the file.
Step 1- Right Click in the PICTURE FIELD and Select INSERT
OBJECT—see illustration:
You should then see the following screen:
You are prompted to either create a new object or Create
from file—Since we already have the picture made we will select the CREATE FROM
FILE OPTION
This will then prompt you with a new screen:
At this point just Click on Browse and find your image
file, highlight the item and Click on OK (twice-once on this screen and again
on the next screen that shows up)
If you are successful your database table will now look
like this and display Bitmap Image in the Picture Field.
Congratulations you have successfully created a Picture
Field and imported a Picture.