Jon: Use indenting!
You take some identical steps, irrespective of the condition, so your intent would be easier to follow (both for you and for others) if the conditional step was all that was inside the âIfâ block:
Code:
Private Sub SaveRecord_Click()
DoCmd.Save
DoCmd.Close
If Me.IncidentKind = "FallofHeight" Then
DoCmd.OpenForm "FallofHeight"
Else
DoCmd.OpenForm "Recording"
End If
End Sub
You could even make it clearer with
Code:
Private Sub SaveRecord_Click()
Dim NextForm As String
If Me.IncidentKind = "FallofHeight" Then
NextForm = "FallofHeight"
Else
NextForm = "Recording"
End If
DoCmd.Save
DoCmd.Close
DoCmd.OpenForm NextForm
End Sub
What kind of a thing is Me.IncidentKind?
You say âHere is the code I am using at the moment, which does not appear to help...â: What
does it do? What is the result that you get that is not helpful?