L
lynn atkinson
I have set up a button using the wizard which opens
another form and displays the related record. I want this
button to also close the original form when it displays
the related form. Where do I put the code and what do I
say?
the existing code produced by the wizard is as follows:
Private Sub go_to_edit_worker_Click()
On Error GoTo Err_go_to_edit_worker_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "new employee edit"
stLinkCriteria = "[employee ID new]=" & Me![employee
ID new]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_go_to_edit_worker_Click:
Exit Sub
Err_go_to_edit_worker_Click:
MsgBox Err.Description
Resume Exit_go_to_edit_worker_Click
End Sub
I want to close the original form called 'worker details
filter form'
How do I go about this?
regards
another form and displays the related record. I want this
button to also close the original form when it displays
the related form. Where do I put the code and what do I
say?
the existing code produced by the wizard is as follows:
Private Sub go_to_edit_worker_Click()
On Error GoTo Err_go_to_edit_worker_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "new employee edit"
stLinkCriteria = "[employee ID new]=" & Me![employee
ID new]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_go_to_edit_worker_Click:
Exit Sub
Err_go_to_edit_worker_Click:
MsgBox Err.Description
Resume Exit_go_to_edit_worker_Click
End Sub
I want to close the original form called 'worker details
filter form'
How do I go about this?
regards