Solved

How populate image from a combobox

Posted on 2014-02-14
7
351 Views
Last Modified: 2014-02-15
I have a form which has a combobox.  Also on the form is an image "field".  The after update event of the combobox isn't populating the image.  Here is my code:

Me.imgImage = Me.cboProdName.Column(3)

And here is the SQL of the combobox:

SELECT tblProductNames.ProdNameID, tblProductNames.ProdNameDesc, tblOrientations.OrientationDesc, tblProductNames.Image
FROM tblProductNames LEFT JOIN tblOrientations ON tblProductNames.OrientationID = tblOrientations.OrientationID
ORDER BY tblProductNames.ProdNameDesc;


Can this even be done?
0
Comment
Question by:SteveL13
  • 4
  • 3
7 Comments
 
LVL 16

Expert Comment

by:Sheils
ID: 39860126
Try using the onchange event of the combo box
0
 

Author Comment

by:SteveL13
ID: 39860306
Didn't work.  I have other fields populating with the afterupdate event but the image will not.

???
0
 
LVL 16

Expert Comment

by:Sheils
ID: 39860443
How are you assigning the image to the image control box.

You basically have two ways


1) In the controlsource of the image box added  cboProdName.[Column](3)

or

Me.imgImage.Picture = Me.cboProdName.Column(3)

Make sure that column 3 of the combo box has the full path of the image
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

Author Comment

by:SteveL13
ID: 39860478
1 didn't do anything.
2 gave me an error ...  Object doesn't support this property or method.
0
 

Author Comment

by:SteveL13
ID: 39860483
By the way... image is an attachment in the table that the query feeding the combobox uses.
0
 
LVL 16

Accepted Solution

by:
Sheils earned 500 total points
ID: 39860543
It will not work if the image are saved in the table. I strongly advise against storing images in tables because it will make you database unnecessarily large and eventually slow it down significantly. You are better of storing the image in a folder and storing only the image path in the table. The one the image box set the picture type as linked
0
 

Author Comment

by:SteveL13
ID: 39862013
Ok.  I understand I am going to award this topic and post another one titled, "How populate image on a form from a hyperlink on the same form?"

--Steve
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now