473,387 Members | 1,553 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

benchpolo
142 100+
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
12 7481
MMcCarthy
14,534 Expert Mod 8TB
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
142 100+
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
14,534 Expert Mod 8TB
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
142 100+
Which is more productive to approach store the path in a table or in the combo box itself?
Oct 15 '07 #5
MMcCarthy
14,534 Expert Mod 8TB
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
142 100+
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
14,534 Expert Mod 8TB
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
142 100+
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
14,534 Expert Mod 8TB
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
142 100+
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
14,534 Expert Mod 8TB
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
142 100+
I know what you mean. Ok I will use the .jpg images instead. Thanks.
Nov 1 '07 #13

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

Similar topics

14
by: D. Alvarado | last post by:
Hello, I am trying to open a window containing an image and I would like the image to be flush against the window -- i.e. have no padding or border. Can I make this happen with a single call to a...
2
by: Stephen Miller | last post by:
When I dynamically populate a HtmlSelect combo box, the Value property consistently fails to return the item selected, defaulting instead to the first item in the list. For example: Protected...
2
by: Tony A. | last post by:
The application I'm working on has three tables State, Customer, Orders. In the first combo box the State is selected. Based on the State selected the second combo box will be populated with the...
9
by: Vmusic | last post by:
Hi, I'm using MS Access 2002. I have a form with a combo box built from a query that returns one column, and that one column is the bound column. How do you use VBA to programmatically change...
8
by: salad | last post by:
I was wondering how you handle active/inactive elements in a combo box. Let's say you have a combo box to select an employee. Joe Blow has been selected for many record however Joe has left the...
7
by: bluray | last post by:
I have been fighting with this for a while, and I know someone on this board will be able to figure it out in a split second :) I have a List Box and a Combo Box. Based on the selection the user...
9
by: ajos | last post by:
Hello friends, After thinking about this for sometime, i decided to post this in the java forum. Well my problem here in detail is, i have 3 jsp pages where in a.jsp(for example) i have a combo...
3
by: KingKen | last post by:
I have the task of adding a value to a textbox based on the selected value in a combo box. The trouble is, I cant seem to access the selected content in the combo box so as to store it in a variable,...
30
ADezii
by: ADezii | last post by:
This week’s Tip of the Week will clearly demonstrate how you can dynamically set the Drop Down List Width of a Combo Box to the length of the longest item in its Row Source. The inspiration for this...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.