How do I display listbox column data in a textbox that is not the bound column?

xwnoob

Registered User.
Local time
Today, 10:16
Joined
Nov 7, 2011
Messages
70
hi,
I have a textbox that has a control source of my listbox. My listbox has two columns: Lender Id and Lender name and my bound column is 1. The control source is LENDERIDFK and its datatype is number so if i set the bound column to 2 it will give an error.So now do i display the lendername in the textbox without changing the bound column?
 
Put this in the controlsource of your textbox

=NameOfListbox.Column(1)

Listboxes and comboboxes are zerobased so the "first" column is 0.

JR
 
Put this in the controlsource of your textbox

=NameOfListbox.Column(1)

Listboxes and comboboxes are zerobased so the "first" column is 0.

JR

Edit: Thanks it works.

Also, i have another problem that i hope you can solve.
There are two textboxes that refer to the same listbox in order to calculate interest rate.

Textbox1 calculate listboxvalue+lenderate. Textbox2 calculate listboxvalue+screenrate. How do i like.....enable the values of only 1 and disable the other ? Lender rate and screenrate are both input boxes . Currently both textboxes will show the results correctly but i do not want both of them to calculate.

Example if i entered lender rate i would like to block off the calculation of screenrate+listboxvalue.
 
Last edited:
It should be:

=[listfacility].[Column](1)

Nothing more.

JR
 

Users who are viewing this thread

Back
Top Bottom