Solved Record Validation Equivalent in Event Forms (1 Viewer)

anski

Registered User.
Local time
Today, 17:02
Joined
Sep 5, 2009
Messages
93
In the general tab of Table Property, there is the Validation Rule. What is the equivalent Event of this in forms? I cannot seem to make it work using On Current and Before Update in forms.

I do not want the cursor to move on to the next record if the sum of field01 and field 02 is zero.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 02:02
Joined
Oct 29, 2018
Messages
21,494
I think you're looking for the Before_Update event of the control itself.
 

jdraw

Super Moderator
Staff member
Local time
Today, 05:02
Joined
Jan 23, 2006
Messages
15,385
Can you give us sample data that illustrates the issue?

As DBG said Before Update, and perhaps Before Insert might apply.
 

anski

Registered User.
Local time
Today, 17:02
Joined
Sep 5, 2009
Messages
93
Before Update worked. I just had to clean up the data as there were records that violated the validation rule. Thanks.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 02:02
Joined
Oct 29, 2018
Messages
21,494
Before Update worked. I just had to clean up the data as there were records that violated the validation rule. Thanks.
Good job. Good luck with the rest of your project.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 05:02
Joined
Feb 19, 2002
Messages
43,352
Make sure you understand the difference in using the form's BeforeUpdate event and the control's BeforeUpdate event. I always use the form level event unless I have some specific reason for using the control's event. Usually it is because I want to give an immediate message to the user and prevent further entry into the form.
 

Users who are viewing this thread

Top Bottom