Getting data to text boxes

cnuhima

Registered User.
Local time
Today, 03:15
Joined
Jun 19, 2008
Messages
72
Hi guys,My problem is i have a listbox and 2 textboxes..based on the number selected in the listbox the textboxes get data from the table.
i mean based on the order no selected the values of name and address must be filled in the textboxes from the table..

Pls help me
 
You need to use the AfterUpdate event of the listbox:
Code:
Private Sub ListBox_AfterUpdate()
 Me.NameTextBox = Me.ListBox.Column(1)
 Me.AddressTextBox = Me.ListBox.Column(2)
End Sub
Be sure to note that the columns of a listbox, like those of a combobox, are zero based, so going left to right, the first field in the listbox is ListBox.Column(0), the second is ListBox.Column(1) and the third is ListBox.Column(2).
 
This is the same scenario I am working on. i do not know anything about code or programing so even though you gave this code i don't have any idea what to do with it. Sory i am such a newbie!
 
Thank You very much.I want to get the values of the textboxes from the table depending upon the selecteed order no.I tried in the above way but of no use..pls give me other solution
 
Pls anybody help me.I need the solution for that ..
 

Users who are viewing this thread

Back
Top Bottom