have you tried debugging it? by putting a breakpoint at the line where you close the form, and checking if that line is processed when you want it ?
Yes i have debugged and that line is executing properly, but not closing the form. I am attaching my code for you reference.
Dim RoleMaster As New frmRoleMaster
GetRole = "LoadMode"
RoleMaster.txtRoleName.Text = grdRoleView.Item(grdRoleView.CurrentRowIndex, 0)
If IsDBNull(grdRoleView.Item(grdRoleView.CurrentRowIn dex, 1)) = True Then
RoleMaster.txtRoleDescription.Text = ""
Else
RoleMaster.txtRoleDescription.Text = grdRoleView.Item(grdRoleView.CurrentRowIndex, 1)
End If
If IsDBNull(grdRoleView.Item(grdRoleView.CurrentRowIn dex, 2)) = True Then
RoleMaster.cmbDataFilter.Text = ""
Else
RoleMaster.cmbDataFilter.Text = grdRoleView.Item(grdRoleView.CurrentRowIndex, 2)
End If
RoleMaster.txtRoleId.Text = grdRoleView.Item(grdRoleView.CurrentRowIndex, 5)
Me.Close()
GetRole = "ViewMode"
RoleMaster.ShowDialog()