Link to home
Start Free TrialLog in
Avatar of augie0216
augie0216

asked on

Possible array solution

I have a form which has three textboxes (txtAircraftID,txtCarrierName, 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_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstAircraftID.SelectedIndexChanged
        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.
ASKER CERTIFIED SOLUTION
Avatar of arif_eqbal
arif_eqbal

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial