Combo box to display 5 charts and 3 single images (1 Viewer)

gippsy

Registered User.
Local time
Today, 01:14
Joined
Dec 15, 2012
Messages
39
Hello

In Access 2013, I have a combobox that when selecting a value displays 5 charts, each chart based on query.

I need in the same combo box that when selecting a value displays 5 charts and a unique image displayed for each value:banghead:. See example

Each image is different and has a file path related to combo box value and chart value.

Any help would be appreciated.
 

Attachments

  • cbxchartas_images.jpg
    cbxchartas_images.jpg
    41.1 KB · Views: 39

gippsy

Registered User.
Local time
Today, 01:14
Joined
Dec 15, 2012
Messages
39
Minty. Many thanks for your reply.
My combo already displays the 5 charts, however, I have been unable to displays the 3 images at a time.

I Tried with no success.

[Private Sub mycbx_Change()
Me.Image5.Picture = Me.mycbx.Column(2)
End Sub]


[Private Sub Form_Load()
Me.Image5.Picture = Me.mycbx.Column(2)
End Sub]
 

Minty

AWF VIP
Local time
Today, 07:14
Joined
Jul 26, 2013
Messages
10,371
Can you get a single image to load? I seem to remember somewhere in my old grey matter, that there was an issue with having more than one image file on a form at a time ?
 

gippsy

Registered User.
Local time
Today, 01:14
Joined
Dec 15, 2012
Messages
39
I enclose an image
 

Attachments

  • LF_2.jpg
    LF_2.jpg
    67.3 KB · Views: 49

Minty

AWF VIP
Local time
Today, 07:14
Joined
Jul 26, 2013
Messages
10,371
Sorry - I meant have you tried just getting one image to display on the form. Not upload one here.
 

gippsy

Registered User.
Local time
Today, 01:14
Joined
Dec 15, 2012
Messages
39
Minty

I enclose the forms displaying 5 charts and one image.

The charts are displaying by the combo box. The image is displayed using the built-in navigation buttons.

I am looking for that the combo box value will display charts an images.:banghead:

Many thanks
 

Attachments

  • charts_image.jpg
    charts_image.jpg
    60.2 KB · Views: 40

isladogs

MVP / VIP
Local time
Today, 07:14
Joined
Jan 14, 2017
Messages
18,247
I Tried with no success.

Private Sub mycbx_Change()
Me.Image5.Picture = Me.mycbx.Column(2)
End Sub


Private Sub Form_Load()
Me.Image5.Picture = Me.mycbx.Column(2)
End Sub
I think you are saying that the path to the 3 images are contained in the combo box mycbx.
It can be difficult to use data direct from the combobox columns for some purposes.

So assuming that:
- image1 path =mycbx.Column(2)
- image2 path =mycbx.Column(3)
- image3 path =mycbx.Column(4)

Try this:
Create 3 hidden textboxes on your form: txtImage1/txtImage2/txtImage3

Set the record source of each as:
Code:
Me.txtImage1=mycbx.Column(2)
Me.txtImage2=mycbx.Column(3)
Me.txtImage3=mycbx.Column(4)
Then use this code wherever it works for the one image:
Code:
Me.Image1.Picture = Me.txtImage1
Me.Image2.Picture = Me.txtImage2
Me.Image3.Picture = Me.txtImage3
It adds an extra step but it may do what you want
 

Users who are viewing this thread

Top Bottom