Simple If statement with 2 conditions - vba

reggiete

Registered User.
Local time
Today, 11:06
Joined
Nov 28, 2015
Messages
56
Hello,
I am needing helping with the if statement below in access 2010. Here is the code below
Private Sub Form_Load()
MsgBox "All Fields marked with a Asterisk* are required fields. Please make sure to answer all required fields before completing remediation review", vbOKOnly Or vbExclamation, "PLEASE READ"
If Target_Response_Date And Target_Response_Date is Null < Now Then
Status.Value = "Aged"
MsgBox "The Targeted response date has passed, Loan is now Aged.", vbOKOnly Or vbExclamation, "Remediation Review Alert - Aged Loan, Please review target completion date"
End If
End Sub

I am needing to add another criteria for the if statement. so the 1st criteria is if the target date is less that Now then change that status to Aged. I want to add another criteria, that if target response date and Final resolution date is null then change status to Aged.
 
obviously the And part is not correct. I want the if statement to say if target date is less than now then change status. But i dont want the status changed if the Final resolution date has a date in the text field.
 
Private Sub Form_Load()
MsgBox "All Fields marked with a Asterisk* are required fields. Please make sure to answer all required fields before completing remediation review", vbOKOnly Or vbExclamation, "PLEASE READ"
If (NZ(Target_Response_Date, 0) < Now) OR (NZ(Target_Response_Date, 0) = 0 AND NZ(FINAL_RESOLUTION_DATE, 0) = 0) Then
Status.Value = "Aged"
MsgBox "The Targeted response date has passed, Loan is now Aged.", vbOKOnly Or vbExclamation, "Remediation Review Alert - Aged Loan, Please review target completion date"
End If
End Sub
 

Users who are viewing this thread

Back
Top Bottom