Hi.

I have a form which calls another form on the click of a button and is then returned to when the called form is closed. On return to the original form I want to call some code that refreshes the original form but cannot find a way to only call that code once the original form is being returned to. At the moment it is calling that code as soon as the second form has been opened. Any help would be greatly appreciated!

Code shown below:

Private Sub buStaffDets_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles buStaffDets.Click
gvar_IDToPass = coPropID.Text
gvar_EditOrNewPerson = "Edit"
gvar_theChkBox = "radStaff"
Dim frmPersonDetails As New frmPersonDetails
frmPersonDetails.Show()
populateFields()
End Sub