Hi all
I have been requested to add conditional 'reminders' to users when data is entered in a form with a query rowsource. Most of them were simple but I am stuck with this one. I hope you can help me identifying the correct syntax or let me know of another possibility.
I have separated each occurrence to identify the bugs
I get errors in every statement
On Exit event
Private Sub audit_posted_date_Exit(Cancel As Integer)
'MsgBox to set the [audit_status] to "Posted" when the field is not null
If Me![audit_posted_date] Is Not Null And Me![audit_status] = "Pre-Posted" Then
MsgBox "Please make sure that the Audit Status is set to Posted", vbOKOnly, "Posted Date Verification"
End If
'MsgBox when the field is null AND the [audit_status] = "Pre-Closed' or "Closed"
If Me![audit_posted_date] Is Null And Me![audit_status] = "Pre-Closed" or me![audit_status] = “Closed Then
MsgBox "A Pre-Closed and Closed audit status requires a date in the Posted Date field", vbOKOnly, "Posted Date Verification"
'Ignore when the field is null AND the [audit_status] = "Pre-Posted"
'Ignore when the field is not null AND the [audit_status] is "Posted"
Thanks!!
If I did not say it before, I really appreciate the time and expertise of the users on this forum.
I have been requested to add conditional 'reminders' to users when data is entered in a form with a query rowsource. Most of them were simple but I am stuck with this one. I hope you can help me identifying the correct syntax or let me know of another possibility.
I have separated each occurrence to identify the bugs
I get errors in every statement
On Exit event
Private Sub audit_posted_date_Exit(Cancel As Integer)
'MsgBox to set the [audit_status] to "Posted" when the field is not null
If Me![audit_posted_date] Is Not Null And Me![audit_status] = "Pre-Posted" Then
MsgBox "Please make sure that the Audit Status is set to Posted", vbOKOnly, "Posted Date Verification"
End If
'MsgBox when the field is null AND the [audit_status] = "Pre-Closed' or "Closed"
If Me![audit_posted_date] Is Null And Me![audit_status] = "Pre-Closed" or me![audit_status] = “Closed Then
MsgBox "A Pre-Closed and Closed audit status requires a date in the Posted Date field", vbOKOnly, "Posted Date Verification"
'Ignore when the field is null AND the [audit_status] = "Pre-Posted"
'Ignore when the field is not null AND the [audit_status] is "Posted"
Thanks!!
If I did not say it before, I really appreciate the time and expertise of the users on this forum.