I don't know why in the below code if the risk approval date is on same day as req_date_time it is showing my message that you cannot put less than req_date_time
Private Sub Risk_app_date_LostFocus()
If Me.Risk_app_date >= Now() Then
MsgBox "You cannot put future date", vbCritical
Me.Risk_app_date.Value = ""
ElseIf Me.Risk_app_date < Me.Req_Date_Time Then
MsgBox "You cannot put Risk approval date less than request date", vbCritical
Me.Risk_app_date.Value = ""
ElseIf Me.Risk_app_date < Me.Resp_Date_Time Then
MsgBox "You cannot put Risk approval date less than response date", vbCritical
Me.Risk_app_date.Value = ""
ElseIf Me.Risk_app_date > Me.Publishing_date Then
MsgBox "You cannot put Risk approval date more than publishing date"
Me.Risk_app_date.Value = ""
End If
End Sub