C
Cyberwolf
I have a form that has a subform that contains a subform. On this 2nd subform
I have a control that has a GotFocus event. When I open the main form the
GotFocus event fires. Here is the code on the GotFocus event.
Private Sub ReasonID_GotFocus()
Dim intResp As Integer
On Error GoTo ReasonID_GotFocus_Error
stLinkCriteria = "[ReasonCodeID]=" & Me.ReasonCodeID
If Me.ReasonID = 1 Then
intResp = MsgBox("Would you like to view the RPP Cause records?",
vbYesNoCancel, "Releated RPP Cause Records available!")
If intResp = vbYes Then
DoCmd.OpenForm "frm_RPPCauseInfo", acNormal, , stLinkCriteria,
acFormReadOnly, acDialog
End If
End If
On Error GoTo 0
Exit Sub
ReasonID_GotFocus_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure
ReasonID_GotFocus of VBA Document Form_frm_ReasonCodes_subform"
End Sub
I have a control that has a GotFocus event. When I open the main form the
GotFocus event fires. Here is the code on the GotFocus event.
Private Sub ReasonID_GotFocus()
Dim intResp As Integer
On Error GoTo ReasonID_GotFocus_Error
stLinkCriteria = "[ReasonCodeID]=" & Me.ReasonCodeID
If Me.ReasonID = 1 Then
intResp = MsgBox("Would you like to view the RPP Cause records?",
vbYesNoCancel, "Releated RPP Cause Records available!")
If intResp = vbYes Then
DoCmd.OpenForm "frm_RPPCauseInfo", acNormal, , stLinkCriteria,
acFormReadOnly, acDialog
End If
End If
On Error GoTo 0
Exit Sub
ReasonID_GotFocus_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure
ReasonID_GotFocus of VBA Document Form_frm_ReasonCodes_subform"
End Sub