Combo Box Issue

jenvandiver

Registered User.
Local time
Today, 11:44
Joined
Oct 16, 2002
Messages
56
Thanks in advance for any advice.

I have several combo boxes on a form which offer the user choices. At this point, when they choose, what shows up in the cbo is the bound column (ID). I would like for the cbo to show both the ID and the title AFTER they select it. Right now it's showing up for them to choose, but once a choice is selected, only the ID appears. Is there an easy way to fix this, and if not, how would I go about having their choice (ID and Title) appear in a separate control? I need to transfer this information to a bookmark in a word document...right now all I'm getting is the ID field.

I don't know how I ended up doing this kind of work!!!

Thanks again,
 
Hi

Combo boxes can only display one column at a time.

I think I'd go for the option of a separate control and put the following code in the combo box's after update event:

txtBookmark = me.cboChoice.column(0) & " " & me.cboChoice.column(1)


hth

shay :cool:
 
Thanks alot for your reply. One problem with doing what you suggested is that I already have code in my after update event because my cbos are cascading. Can I put it all in there together or what?
 
I could populate a record in a new table with the choices the user makes from the cbos, then create a pop-up form based on that table asking the user to verify their choices. Can someone give me an example of code that would send the cbo information to a record in a new table?

Many thanks!
 
Hi

I think that'd be a lot of unnecessary work if all you really want to do is display the ID and title.

There isn't a restriction on the amount of code you can put in an event procedure.

Try putting a text box on your form, call it txtBookmark and put the line of code I suggested in the combo's after update event. Let me know how it goes!

shay :cool:
 
You don't need any code to do this, just set the control source of the unbound textbox to
=[cboChoice].[column](0) & " " & [cboChoice].[column](1)
 
Wow. Thanks to both of you. I tried Rich's suggestion and it worked perfect. It's nice to know there's always more than one way to do it!
 

Users who are viewing this thread

Back
Top Bottom