Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

from combo box column to text box 1

Status
Not open for further replies.

munger

Programmer
Feb 28, 2001
23
IL
I have a combo box named "LicenseNumber" that successfully displays from a table named "Trucks" the two fields:

"LicenseNumber" and "Weight"

The user is to click on the proper License number which then appears in the combo box.

The "Weight" is then supposed to appear in a text box called "Tara".

I have been unable to get the "weight" to the text box.

Any ideas?

Michael
 
in the afterupdate event of the combobox type:

me![tara]=me![licensenumber].column(1)

columns in comboboxes are numbered from 0 so your weight is in column 1 (the second column)

HTH
 
I have incorporated this code, however it is not working. I have the line:

[txtAcctName] = [AccountNo].Column(1)

and I am being told "Method or data member not found" and the word "Column" is highlighted in debug.

Help? Susan M. Wagner
LAPELS
emzadi1@yahoo.com
susanw@lapels.com
 
emzadi

More detail please! What isn't working? Does anything happen at all?

Lightning
 
You can display data from a listbox column with the following expression: =[<listoxname>].[column](#), where # is the column number, starting with 0. For example, =[listbox].[column](0) will display the data from the first column of the list.
 
Cool... it worked... thanks to all... This is what I ended up with:

txtAcctName.Text = Account_No.Value + &quot; &quot; + Account_No.Column(1) + &quot; &quot; + Account_No.Column(2) Susan M. Wagner
LAPELS
emzadi1@yahoo.com
susanw@lapels.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top