Images on Continuous Forms

E

EAL

[image: http://www.mink-studios.com/sample_form.jpg]

A sample of what I'm trying to create, and a two parter-question...

(1) I'm trying to create a form that displays *different* linked image
in continuous forms, as the left side of the above image indicates. M
table contains the path/filename for each of the photos. No OL
objects.

I've found a lot of scripts which permit me to display one image at
time based on the image's path. But when I run the scripts and set th
form's Default View to "Continuous," I see one picture, repeated ove
and over. The only way that I can see another photo is to move th
focus to that photo's section of the form. Then all the images chang
to the second photo. Like so:

[image: http://www.mink-studios.com/sample_form2.jpg]

I think the problem is that all the scripts are dependent on findin
the image's path in a text box control on the form, and so the imag
displayed is dependent on which text box has the focus. Is there som
script that will display all of the images at one time? I've bee
googling for hours.

(2) Also, is it possible use a bound object frame that displays image
from paths, rather than an image control? I want to use this form as
navigational subform to select records, and it does not appear to b
possible to do that with an image control.

Thank you
 
J

Jesper

(1) I'm trying to create a form that displays *different* linked images
in continuous forms, as the left side of the above image indicates. My
table contains the path/filename for each of the photos. No OLE
objects.

I've found a lot of scripts which permit me to display one image at a
time based on the image's path. But when I run the scripts and set the
form's Default View to "Continuous," I see one picture, repeated over
and over. The only way that I can see another photo is to move the
focus to that photo's section of the form. Then all the images change
to the second photo. Like so:

[image: http://www.mink-studios.com/sample_form2.jpg]

I think the problem is that all the scripts are dependent on finding
the image's path in a text box control on the form, and so the image
displayed is dependent on which text box has the focus.

Almost. The thing is that your ubound image control will have the same value
for alle the records in the continous form. That's the nature of a
continious form and that's why you don't see the right picture until you
click the record. I asked the same question a while back and godt this
reply, which is a good idea although I never tried it:

"One approach you might take is to have a set of 10 separate, numbered,
unbound image controls on your form -- named, for example, imgPic1,
imgPic2, ... imgPic10 -- and have your own logic to load up these
controls with the picture data to be displayed for the current main
record. Have your own buttons to page forward and backward through the
available pictures for the current main record, showing up to 10 at a
time in these controls. If there are fewer than 10 pictures for a given
"page", then hide the image controls you don't need.
I did something like this some time ago, just as a test, and it worked
pretty well." (Dirk Goldgar, MS Access MVP)

Jesper, Denmark
 
E

EAL

Thank you so very much for your response.

I think I have tried the method that you suggest above... the onl
problem is that it will only work if I name the photos "Pic1," "Pic2,
etc. I have the database set up to give each photo a unique name, s
the image controls that you describe won't find my images. Or am
mistaken?

Thanks again
 
J

Jesper

Thank you so very much for your response.
I think I have tried the method that you suggest above... the only
problem is that it will only work if I name the photos "Pic1," "Pic2,"
etc. I have the database set up to give each photo a unique name, so
the image controls that you describe won't find my images. Or am I
mistaken?

I think the suggestions in my previous post is really more for creating kind
of an image gallery with the images connected to the main record.
You have a subform and there no way to have individual viewable images on
each record in the subform.
But it would be possible to maybe simulate the subform behavior at least for
showing the images. If you need the to edit the information in the records
connected to the main record this solution may not work. At least it would
require quite a bit more work since you'd have to hand-code all updates to
the related table.

The idea with the images was to have image controls named ie. pic1-pic10.
The via some SQL find the records in the image table that has the image
filenames connected to the main record.
With a for-next loop you could place these images in the image controls (and
hide the unused ones). This all has to be set up manually though.
If you know that a main record will never have more than 10 images connected
with it that's one thing. But if the main record has say 50 images connected
with it you have to also create some code that will cycle the images in the
10 image controls. All this isn't standard but could be done.
Hope you can get it work.

Jesper F, Denmark
 

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