424,054 Members | 1,055 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,054 IT Pros & Developers. It's quick & easy.

Image to disyplay dynamically based on combo or list box value selected

benchpolo
100+
P: 142
I have a group of 20 images (.jpg) formats that I want to incorporate with my new access database that will dynamically display the image on the form based on the value that I select from the combo-drop down box or list box. I have no problem creating the combo-drop down box or list box, but I need assistance on the image part.

I can create this method in VB 6, but have not tried in MSAccess 2000 or 2003. Thanks.
Oct 15 '07 #1
Share this Question
Share on Google+
12 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
I have a group of 20 images (.jpg) formats that I want to incorporate with my new access database that will dynamically display the image on the form based on the value that I select from the combo-drop down box or list box. I have no problem creating the combo-drop down box or list box, but I need assistance on the image part.

I can create this method in VB 6, but have not tried in MSAccess 2000 or 2003. Thanks.
Does the drop down box hold the full path to the image or is the image stored in the database?
Oct 15 '07 #2

benchpolo
100+
P: 142
The drop down is just a list. I need somehow a starting point on how to tackle this task. I've never worked on a dynamic image on an MSAccess form before.
Oct 15 '07 #3

MMcCarthy
Expert Mod 10K+
P: 14,534
The drop down is just a list. I need somehow a starting point on how to tackle this task. I've never worked on a dynamic image on an MSAccess form before.
OK somehow you need to retreive the full path to the image.

Then put an image box on the form. (image1)

Then in the after update event of the combobox ...

Me.image1.picture = Me.cboComboName

This assumes you have the full path to the images stored in the cboComboName. You can do this by adding the full path of the file as the value in a second column on the drop down and set the bound column to 2.
Oct 15 '07 #4

benchpolo
100+
P: 142
Which is more productive to approach store the path in a table or in the combo box itself?
Oct 15 '07 #5

MMcCarthy
Expert Mod 10K+
P: 14,534
Which is more productive to approach store the path in a table or in the combo box itself?
Probably in the table.
Oct 15 '07 #6

benchpolo
100+
P: 142
Can you give me a starting point on how to start this feature? I've no idea where to start. Thanks.
Oct 16 '07 #7

MMcCarthy
Expert Mod 10K+
P: 14,534
Can you give me a starting point on how to start this feature? I've no idea where to start. Thanks.
Are all your image files located in a particular folder on your computer?
What is the structure of the table holding the picture names?
Do you use the exact same name for the picture names as the image file names?
Have you created a form with a combo box and an image frame? If so what are the names (name property) of those two controls and what is the name of the form?
Oct 16 '07 #8

benchpolo
100+
P: 142
Is there a standard image dimension (width and height) when using OLE Object?

I built a credit card table with image referencing to the card, but after creating the form using size mode 'stretch' some images are not fitted to the screen.
Oct 31 '07 #9

MMcCarthy
Expert Mod 10K+
P: 14,534
Is there a standard image dimension (width and height) when using OLE Object?

I built a credit card table with image referencing to the card, but after creating the form using size mode 'stretch' some images are not fitted to the screen.
You just decide what it is.

The size of the image frame has to be the same as all the images. e.g. if you set the image frame to 100 x 100 then all your images have to be the same size.

Stretch will only work if the image frame and all the images are squares
Oct 31 '07 #10

benchpolo
100+
P: 142
Okay .. i was able to create my db image version based on Northwind Categories table. Just for curiousity, can access display animated images?
Nov 1 '07 #11

MMcCarthy
Expert Mod 10K+
P: 14,534
Okay .. i was able to create my db image version based on Northwind Categories table. Just for curiousity, can access display animated images?
I think so but I wouldn't advise it and have never tried.

Access is hard enough on memory without using animation
Nov 1 '07 #12

benchpolo
100+
P: 142
I know what you mean. Ok I will use the .jpg images instead. Thanks.
Nov 1 '07 #13

Post your reply

Sign in to post your reply or Sign up for a free account.