Combo Box

gselliott

Registered User.
Local time
Today, 11:19
Joined
May 17, 2002
Messages
106
I have got a Combo Box that is referenced to a table and shows 2 columns, what I would like to do is when I select the value from the list (column 1) I want the corresponding value in column 2 to be placed in another text box on the form is this possible?

Any help would be appreciated.
 
Set column 2 as the bound col. and in the afterupdate event for the combo box do something like:

me!txtBox = me!cboBox

??
kh
 
Thanks for that that would work but I need to keep the original value (Column 1) in the combo box and have the value from column 2 be placed in the new Text box hope this makes sense? Is there any way this can be done?

Thanks again.
 
maybe this would work?

set column count to 2, with widths of 1";0"
and bound to column 2
 
Nope sorry that still doesn't work any other ideas i've hit a brick wall now!
 
in the bound column field, does the numbering start at 1 or 0?
 
It worked for me.

you have to set column count to 2. that means the combo will look at 2 columns.

if you set the column width to 0";1", that means the first column is 0" wide, and the second is 1" wide... so you see the second but not the first.

if you set the bound column to 1, then the combo's output is whatever is in column 1.

or if you want to see column 1 and output column 2, widths should be 1";0", and the bound column should be 2.

the column count has to be 2 to work.
 

Attachments

=[ComboName].[Column](1) as the control source of your textbox

column 1 is the second column of your combo box
 
Thank you all for your help it now works a treat!
 

Users who are viewing this thread

Back
Top Bottom