I am closing my form and wish to validate the entries.
What I want to do is check the fields for validated data.
In order to flag a message: The following must be met
1. That the record is saying "Completed"
AND
2. One date is after another date
AND
3. There is no data in the "reason field"
I tried to do the calculation within my vba but instead I have done this separately and saved the result in an unbound field (datediffs)
Guess what ? it doesnt work !!!
I have tried just the
and this works.
I'm just struggling to get all three rules to evaluate. It doesnt crash, it just closes my form.
Thanks peoples !!
What I want to do is check the fields for validated data.
In order to flag a message: The following must be met
1. That the record is saying "Completed"
AND
2. One date is after another date
AND
3. There is no data in the "reason field"
I tried to do the calculation within my vba but instead I have done this separately and saved the result in an unbound field (datediffs)
Code:
Private Sub Command70_Click()
Me.Refresh
Me.Requery
Me.datediffs = Me.rep_rb - Me.drc
If Me.rec_type = "Completed" And Me.datediffs < 0 And IsNull(cnm_reason) Then
MsgBox "Please give a reason why this report is late"
Exit Sub
Guess what ? it doesnt work !!!
I have tried just the
Code:
If Me.datediffs < 0 Then
I'm just struggling to get all three rules to evaluate. It doesnt crash, it just closes my form.
Thanks peoples !!