I have the following code entered on a subform:
-aldo
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.Verify = -1 And Me.Status = 0 Then
Dim strMsg As String
strMsg = "This account has not been updated." & Chr(10) & Chr(10) & _
"Do you wish to update the account now?"
If MsgBox(strMsg, vbQuestion + vbYesNo, "Update Account?") = vbYes Then
Me.Status = -1
Else
End If
End If
End Sub
The code is placed on the subform 'Form_Main' with the intention that if the 'Verify' checkbox is selected the data entry person will receive a reminder that they did not update the current account. The code seemed to work fine, but there are 4 subforms on the 'Form_Main' form and if any of those are selected the code will run inadvertently. Is there anyway to code so that the program only runs the verification process when moving between records on the 'Form_Main' form?If Me.Verify = -1 And Me.Status = 0 Then
Dim strMsg As String
strMsg = "This account has not been updated." & Chr(10) & Chr(10) & _
"Do you wish to update the account now?"
If MsgBox(strMsg, vbQuestion + vbYesNo, "Update Account?") = vbYes Then
Me.Status = -1
Else
End If
End If
End Sub
-aldo
Last edited: