augie0216
asked on
Possible array solution
I have a form which has three textboxes (txtAircraftID,txtCarrierN ame, and txtFuelCharges). and a listbox lstAircraftId. What I need to have happen is once the user fills the textboxes and the menu is clicked the AircraftID appears in the listbox, once the text boxes are cleared and the aircraftID is highlighted in the listbox the aircraftID and the other entered text reappears in the proper textbox. I can get the aircraftID to appear in the textbox, and I can get the AircraftID to reappear in it's textbox but not the other entered text. I was hoping someone could help me with an array to accomplish this. Here is the code for the menu and the listbox.
Private Sub mmuRecordSaveArrival_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mmuRecordSaveArrival.Click
Dim newitemtext As String = txtAircraftID.Text
Private Sub AircraftID_SelectedIndexCh anged(ByVa l sender As System.Object, ByVal e As System.EventArgs) Handles lstAircraftID.SelectedInde xChanged
Dim sAircraftID As String = lstAircraftID.SelectedItem .ToString( )
txtAircraftID.Text = lstAircraftID.SelectedItem .ToString
I think an array is the solution but I don't know exactly how to code it.
Private Sub mmuRecordSaveArrival_Click
Dim newitemtext As String = txtAircraftID.Text
Private Sub AircraftID_SelectedIndexCh
Dim sAircraftID As String = lstAircraftID.SelectedItem
txtAircraftID.Text = lstAircraftID.SelectedItem
I think an array is the solution but I don't know exactly how to code it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.