By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,905 Members | 879 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,905 IT Pros & Developers. It's quick & easy.

Display images that change in the detail field of a subform

P: n/a
I am trying to create a subform that will display images related to the
parent form. The subform is a continuous form as there will be several
images that relate to the parent form.

I checked Access help and it gave me the following code, which I have
adapted for my database and it works well as a SINGLE FORM.

Option Compare Database

Private Sub Form_Current()
On Error Resume Next
Me![imgfootage].Picture = Me![image]
If Me![image] = "" Then Me![imgfootage].Picture =
"m:\macfiles\library\noimagefound.jpg"

End Sub

Private Sub Image_AfterUpdate()
On Error Resume Next
Me![imgfootage].Picture = Me![image]
End Sub

However, if I change the subform to CONTINUOUS, it will display the
same image on all of the records displayed in the form.

I tried changing the subform detail's Current and AfterUpdate
properties, but lo, no such properties exist for the detail.

Conventional wisdom seems to indicate that this cannot be done on a
subform in continuous form mode. I think there HAS to be a way. A
search of this group seems to bring me close to a solution, but they
don't seem to apply entirely to my situation and I am not good enough
(yet) to bridge the gap in my application.

Thanks for any help anyone can give.

vidiot

Nov 1 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a

"vidiot" <vi***************@yahoo.comschreef in bericht news:11*********************@e3g2000cwe.googlegrou ps.com...
Conventional wisdom seems to indicate that this cannot be done on a
subform in continuous form mode. I think there HAS to be a way. A
search of this group seems to bring me close to a solution, but they
don't seem to apply entirely to my situation and I am not good enough
(yet) to bridge the gap in my application.
Stick to the conventional wisdow ;-)
IME this can't be done in a continuous form ...
Also: The current event only fires for the current record in the continuous form...
So IF it were possible to display different images it still would NOT work this way.

Only in a report you can display different images for each record.

If the need is only for two or three of four records you *could* try to use more subforms (one for each record)
Then you *could* make the subform(s) visible depending on the number of records to display.
But I think that conventional wisdom also tells me that I would not even try to do this since it is a very limited 'solution'...

Create a button instead that will show the image (e.g. in a pop-up form) if one wants to see the picture related to the record.

Arno R
Nov 1 '06 #2

P: n/a
vidiot wrote:
I am trying to create a subform that will display images related to the
parent form. The subform is a continuous form as there will be several
images that relate to the parent form.
The approach I took when faced with this problem was to create a series of controls to
mimic a continuous form and then use code to populate the controls. I also created
navigation controls. The controls are unbound; the code handles everything.

Quite a bit of code but you have total control over everything.

--
'---------------
'John Mishefske
'---------------
Nov 2 '06 #3

P: n/a

Arno R wrote:
"vidiot" <vi***************@yahoo.comschreef in bericht news:11*********************@e3g2000cwe.googlegrou ps.com...
Conventional wisdom seems to indicate that this cannot be done on a
subform in continuous form mode. I think there HAS to be a way. A
search of this group seems to bring me close to a solution, but they
don't seem to apply entirely to my situation and I am not good enough
(yet) to bridge the gap in my application.

Stick to the conventional wisdow ;-)
IME this can't be done in a continuous form ...
Also: The current event only fires for the current record in the continuous form...
So IF it were possible to display different images it still would NOT work this way.

Only in a report you can display different images for each record.

If the need is only for two or three of four records you *could* try to use more subforms (one for each record)
Then you *could* make the subform(s) visible depending on the number of records to display.
But I think that conventional wisdom also tells me that I would not even try to do this since it is a very limited 'solution'...

Create a button instead that will show the image (e.g. in a pop-up form) if one wants to see the picture related to the record.

Arno R
Thanks! At least I know that in this case, conventional wisdom is
pretty much correct. But I will try the button approach. It sounds
like it has promise!

Thanks, Fred

Nov 2 '06 #4

P: n/a

John Mishefske wrote:
vidiot wrote:
I am trying to create a subform that will display images related to the
parent form. The subform is a continuous form as there will be several
images that relate to the parent form.

The approach I took when faced with this problem was to create a series of controls to
mimic a continuous form and then use code to populate the controls. I also created
navigation controls. The controls are unbound; the code handles everything.

Quite a bit of code but you have total control over everything.

--
'---------------
'John Mishefske
'---------------
It does sound complex, but it is also a complicated database that I am
putting together. I think between your advice and the previous post, I
will find the answer. I'll post something when I get a chance to try
it.

Thanks, Fred

Nov 2 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.