How To Place Images or Photographs Into Access

woodini254

New member
Local time
Today, 09:10
Joined
Apr 22, 2012
Messages
1
Hi

I have created a simple database for Bonsai Trees, I want to place a photograph of each tree which will be different in each record. I am using MS Access 2000 can anyone help.

Rich
 

Attachments

  • MS Access Database.jpg
    MS Access Database.jpg
    90.2 KB · Views: 61
I would suggest your starting point is RE00001.jpg etc. Putting these images into a directory and then if you let us know which version you are using we can look at some scripts.

Simon
 
Hi,

There are two approaches to this. One is to store the image in the database as an OLE object. Others may say different, but I would advise against this as they can cause your database to bloat. In a worst case scenario a 50 kB image can take up 1 MB in an Access database, because access will store a thumbnail version of the file as a bitmap.

I assume you have a table with trees, with a record for each tree. I suggest you add a new text field which you use to store the path of the image.

Next add an image control to your form.

Using the On Current event of the form enter this code:

Code:
Private Sub Form_Current()
  Me!ImageControlName.Picture = Me!ImagePathFieldName
End Sub
 

Users who are viewing this thread

Back
Top Bottom