473,785 Members | 2,568 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

benchpolo
142 New Member
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 7539
MMcCarthy
14,534 Recognized Expert Moderator MVP
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 New Member
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 Recognized Expert Moderator MVP
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.pictu re = 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 New Member
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 Recognized Expert Moderator MVP
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 New Member
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 Recognized Expert Moderator MVP
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 New Member
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 Recognized Expert Moderator MVP
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

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

Similar topics

14
11097
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 window.open function? I would prefer not to create a separate HTML page. So far all I have is the basic var cwin = window.open('images/KJV-THANKS.gif', 'Thanks', 'width=243,height=420,'); cwin.focus();
2
5824
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 WithEvents Fruits As System.Web.UI.HtmlControls.HtmlSelect Protected WithEvents Results As System.Web.UI.WebControls.Label Protected WithEvents Button1 As System.Web.UI.WebControls.Button … Private Sub Page_Load(ByVal sender As System.Object, ByVal...
2
2099
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 Customers in that state. Based on the Customer selected a datagrid will be populated with the customer's orders. I setup the query for the secont combo box as follows: Select CustName From tblCustomer Where State = @cboState
9
32626
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 which row in the combo box is selected?? I looked at the forum and the answers aren't very clear. Of course the MS Access help file is worthless.
8
8263
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 company and has been flagged inactive. If you have a filter on the rowsource like Where Active = True then Joe's name would not show up in the combo list. This would be fine if the combo is associated with a field that is null/0. It would not be...
7
15032
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 makes in the Combo Box, I need for the Rowsource in the List Box to be changed to one of two queries, and requeried so the user can select an option from the List Box based on the newly selected criteria from the Combo Box. I thought it would be...
9
9921
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 box, based on the selection of the value in that combo box, b.jsp page gets populated with the value associated to a.jsp, and again based on the selection of value of the 2nd combobox my 3rd combo box gets populated, which is in c.jsp. I'm able to...
3
2151
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, then compare it in a switch statement, in order to write the required output to the text box. Here is the code i am using function EnterUserID() { var Name=document.MyForm.txtPerformedBy.value; switch (Name) { case...
30
26535
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 Tip came from one of our own resident Experts, mshmyob. In response to a Thread relating to this very Topic, mshmyob came up with a rather ingenious method to accomplish this task. He computed the Average Character Width of a String consisting of...
0
9481
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10095
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9954
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7502
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6741
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5383
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5513
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4054
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.