Vb.net data retrieve from one form to another form

Viewed 32

I have one form called waybill on that I have rack drop down list, from waybill I called/open Rack form to enter new rack data. When I insert the new rack data after that I called the procedure to retrieve newly enter rack data to fill in waybill rack drop down list, but rack data is not retrieved in drop down in waybill form.

I debug the code, it is running fine with no error, but newly entered data is not getting stored.

This is the code:

Private Sub WaybillForm_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown

        If e.KeyCode = Keys.F1 Then
            AddnewRack.Show()
        End If

    End Sub

Here is the procedure.

Public Sub frmFillRack()

'' retrieve code

End Sub

I put the insert code on button click in AddnewRack form.

    Private Sub SimpleButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SimpleButton1.Click
    
'after insert code I called the procedure.

    Call WaybillForm.frmFillRack()
    
    End Sub

End Sub

Note that data is saving properly and when I close and open waybill form that time newly data is showing.

Thanks Basit

0 Answers
Related