I am using the code below, and need it to do two additional things -
1) Stop at each if block and not allow the user to go on until the missing piece of information is filled in, then go on to check the other areas. As is the user gets the messagebox, but as soon as they click OK and before they fill in anything, the Check Completed, OK to Print box pops up. 2) After the routine has completed and all the information is complete, save the record. Any suggestions would be appreciated.
Private Sub cmdCheck_Click()
If IsNull (Me.RevDate) or Me.RevDate = "" Then
MsgBox "You must enter a review date", vbOKOnly, "Required Data"
Me.RevDate.SetFocus
End If
If IsNull (Me.ProvCd) or Me.ProvCd = "" Then
MsgBox "You must enter a provider code", vbOKOnly, "Required Data"
Me.RevDate.SetFocus
End If
MsgBox "Check completed, ready to print."
cmdPrintCover.enabled = True
End Sub
1) Stop at each if block and not allow the user to go on until the missing piece of information is filled in, then go on to check the other areas. As is the user gets the messagebox, but as soon as they click OK and before they fill in anything, the Check Completed, OK to Print box pops up. 2) After the routine has completed and all the information is complete, save the record. Any suggestions would be appreciated.
Private Sub cmdCheck_Click()
If IsNull (Me.RevDate) or Me.RevDate = "" Then
MsgBox "You must enter a review date", vbOKOnly, "Required Data"
Me.RevDate.SetFocus
End If
If IsNull (Me.ProvCd) or Me.ProvCd = "" Then
MsgBox "You must enter a provider code", vbOKOnly, "Required Data"
Me.RevDate.SetFocus
End If
MsgBox "Check completed, ready to print."
cmdPrintCover.enabled = True
End Sub