Calculated Field Validation

geet72

Registered User.
Local time
Yesterday, 16:12
Joined
Mar 6, 2008
Messages
14
I have a form with three entries. I am creating a calculated field with the sum of these three entries. The calculated field sum should add up to 100. If not, there should be a error message that pops up and the user would not be able to proceed until the three entries are adding up to 100. How can I do this

Regards
 
The typical place for validation is the before update event of the form. If data fails validation, you can add this to your code to stop the update:

Cancel = True
 
Thanks. Can you please tell me the code for this. I am a beginner and I am still trying to figure this out

Regards
 
Along the lines of:

Code:
If Me.CalculatedFieldName <> 100 Then
  Msgbox "Check the amounts"
  Cancel = True
End If
 

Users who are viewing this thread

Back
Top Bottom