Image loaded based on combo box selection

thart21

Registered User.
Local time
Yesterday, 23:42
Joined
Jun 18, 2002
Messages
236
I've looked through all the code I could find in here but can't find one that works for my situation.
I have a form with 15 unbound combo boxes all filled with the same data (connector names). The user will be able to select up to 15 connectors. I would like, when a connector is selected, to have an image of that connector show up in a box next to the selected item. I don't want to replace it, just show the image by it. I have links to the images stored in my connectors table and thought I could just do an After Update of the combo box to insert the image in the image text box.

Me!connectorpicture = Me!cboOne.Column(2) but nothing happens with this code.

I am a little confused as to what field type to use for this if I want to enter a link to the image in my table as opposed to embedding it. Right now I have it as an Ole Object and on the form I have a Bound Object Frame.

Any point in the right direction would be appreciated!

Toni
 
Paste this code below on After_Update Combo Box...

Me.RecordsetClone.Findfirst "[field name] = " & Me![ComboboxName]
Me.Bookmark = Me.RecordSetClone.Bookmark


hth,

Michael
 
Thanks for the response Michael. I'm getting a "Datatype mismatch" error with this. Any idea why that would happen? My combo box is "text" and my picture field is a Bound Object Frame. I loaded the images in the Connectors table by right clicking and inserting. It shows up in the table field as "Microsoft Photo Editor 3.0 Photo"

Thanks again,

Toni
 
Thanks for the sample-I'll give it a try!

Toni
 

Users who are viewing this thread

Back
Top Bottom