MarkWaddington
Programmer
I have this code attached to a command button, which when pressed, opens up a popup form (based on another table with a One-to-one relationship with my main form).
Private Sub EmploymentHistory_Click()
On Error GoTo Err_EmploymentHistory_Click
If Me.NewRecord Then Me.Recalc
DoCmd.OpenForm "Client_Employment", , , "[EmpNo] = Forms![Client]![RegNo]"
Exit_EmploymentHistory_Click:
Exit Sub
Err_EmploymentHistory_Click:
MsgBox Err.Description
Resume Exit_EmploymentHistory_Click
End Sub
The form opens ok, but when I enter data, then close it and open it again.. all the data I entered disappears, obviously was never stored!
Any ideas?
Thanks in advance.
Mark Waddington.
Private Sub EmploymentHistory_Click()
On Error GoTo Err_EmploymentHistory_Click
If Me.NewRecord Then Me.Recalc
DoCmd.OpenForm "Client_Employment", , , "[EmpNo] = Forms![Client]![RegNo]"
Exit_EmploymentHistory_Click:
Exit Sub
Err_EmploymentHistory_Click:
MsgBox Err.Description
Resume Exit_EmploymentHistory_Click
End Sub
The form opens ok, but when I enter data, then close it and open it again.. all the data I entered disappears, obviously was never stored!
Any ideas?
Thanks in advance.
Mark Waddington.