List row effect text box

me_ntal

Registered User.
Local time
Tomorrow, 06:17
Joined
Jun 22, 2011
Messages
13
Hey guys i need to some how make it so when i click a row in my list a text box changes the text shown.
Please refer to picture





Thanks To B
Solution Found
 

Attachments

  • help.jpg
    help.jpg
    95.5 KB · Views: 135
Last edited:
Assuming that you have not set your list box as a multi-select list box, and assuming that the "Plant No" field is the bound column in your list box, you can use code in the After Update event of your list box like:

Code:
Me.NameOfYourTextbox = Me.NameOfYourListBox

Just change the "NameOfYourTextbox" and "NameOfYourListBox" to the actual names of your textbox and listbox appropriately.
 
Thanks man, Just a question what if i want the next column in another text box
 
The columns in a listbox or combo box have a zero based numbering. This means that you can refer to any column in a listbox or combo box (visible or not) with code. To refer to the second column you can use code like:

Code:
Me.NameOfYourTextbox = Me.NameOfYourListBox.column(1)
 
You are quite welcome. Glad to help.

Good luck with your project.
 

Users who are viewing this thread

Back
Top Bottom