Adding Pictures

F

Fred

I am trying to find out how to display multiple images in
a Form or in a Report Without Storing the Images in a
Table. I have couple of tables ( Owners and
Properties ), I would like to find a way to display
multiple pictures of a particular property on the same
form and be able to put the pictures in a folder for that
Property so that if I add more to them then they will
display on the form accordingly.
Please help
 
J

John Nurick

Hi Fred,

I can't think of a simple way of displaying 1,2,3,4...N photos on the
same form at the same time, depending how many there happen to be in the
relevant folder.

If you're happy to have a fixed number of (unbound) image controls on
the form (say 3 or 4) and only display the first 3 or 4 images in the
folder, it's not difficult. Store the name of the folder in a field in
the table, and then use code in the Form's Current event procedure to

-Set the Visible property of all the image controls false.
-Get the name of the first image file, using e.g, Dir(FolderName &
"*.jpg)
-Use this to set the first image control's Picture property
-Set the first control's .Visible property True.
-Get the name of the second image file, using Dir()
-Set the Picture property of the second control
...and so on.

To control just which pictures are displayed, keep their filenames in a
related table (1 Property: many Pictures). Doing it this way will (I
suspect, I'm not an expert on reports) also make it easier to create a
report that can display any number of pictures on as many pages as are
needed.

For background on handling images stored as separate files, see Take a
Arvin Meyer's PictureMgr sample database here
http://www.datastrat.com/DataStrat2.html
 

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