Reputation: 65
I am having problem in data validation in one of my continuous subforms. There is a total score (TScore) field which is calculated (total of "Score" field) and a max score (MaxScore) field. I want the TScore value to never exceed my MaxScore value. I have tried validation rule (<=[MaxScore]) on TScore but nothing happens. I have also found out that validation rule doesn't work on calculated fields. I have also tried the Form_BeforeUpdate event like the following:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If TScore > MaxScore Then
MsgBox "The total score cannot be greater than max score.", vbOKOnly, "Warning!"
End If
End Sub
But this don't work as well. Now I need some help on this.
Upvotes: 0
Views: 87