Re: Validation Rule on Table Field vs Form Control
- From: "gweasel" <baneaic@xxxxxxxxx>
- Date: 7 Mar 2007 14:15:53 -0800
On Mar 7, 2:24 pm, "Larry Linson" <boun...@xxxxxxxxxxxxx> wrote:
Table validations are applied when you write the Record, and that's what
happens when you go from a main Form to the Form embedded in a Subform
Control. You can "protect yourself" with Table-level validation and _also_
protect your users from unfriendly error messages, by _also_ including
validation in VBA code in the AfterUpdate of Controls on the Form. (Yes, I
know -- extra work... frustrating, isn't it?)
Larry Linson
Microsoft Access MVP
"gweasel" <bane...@xxxxxxxxx> wrote in message
news:1173278530.215387.4170@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have set the Required property to yes and moved the validations to
the table level instead of the form level. I like to have the
validation rules in effect though because the error messages that come
up when only the Required property are set are not helpful to the end
user (they refer to the field name as "[Tbl_Name].[Field_Name]" and
that is confusing to the users.
I am actually having an issue though. I swear this was working
earlier in the week, but even before moving the rules to the table
level, when I went through to test the system, I am able to breeze
right through the supposedly required fields/controls. Now, if I am
switching from a form to the subform, I get the unhelpful "required
property" error message, but never see the validation text I typed
out. And ideally, I'd want this message to pop up when they are
trying to exit the required control on the form rather than when
they're trying to exit another control to get into a subform. For
example, "Due Date" is required, but it is 5 tab stops away from my
subform. They can tab/click right past "Due Date" and never know they
missed something that was required until 5 steps later. I think this
is adding to confusion as well - since they're most likely going to
look in the last field they were in to try and fix the problem, when
in reality, they need to go back farther than that.
Make sense? Any idea how I can have these messages pop up "On exit"
basically, without coding? If coding is needed, I guess that's fine,
but please give me some hint as to what I need to make it work and
give the user a custom message instead of the default messages Access
gives.
Thanks.
On Mar 7, 6:03 am, "Don Leverton" <leveriteNoJunkM...@xxxxxxxxxxxxxxx>
wrote:
Hi,
IMHO, it sounds like it would just be easier to set the "Required"
property
to "Yes" in the table design view in a case like this.
HTH,
Don
"gweasel" <bane...@xxxxxxxxx> wrote in message
news:1173238121.938426.306890@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
What is the best way to apply a Validation Rule - or rather, where is
the best place to put it? Is there an advantage to putting it on the
field in the table vs setting the validation rule on the form the
control is on?
Basically I have a number of controls in a form that are required, and
to check it I am setting the Validation Rule to "<>"IsNull" so that
when the user tries to tab through/click out of a required area
without entering anything, they are alerted. I noticed though, after
I'd set up a few controls on the form this way, that the same settings
are also available when creating the table that drives the form.
Just curious and want to fix possible problems before I release the
system to the end users.
Thanks.
It's not that much extra work - just one of those things I thought
(like so many others) would be included in the properties or regular
functions. But, alas, coding it is. Thanks for the advice and
explanations.
.
- Follow-Ups:
- Re: Validation Rule on Table Field vs Form Control
- From: missinglinq via AccessMonster.com
- Re: Validation Rule on Table Field vs Form Control
- References:
- Validation Rule on Table Field vs Form Control
- From: gweasel
- Re: Validation Rule on Table Field vs Form Control
- From: Don Leverton
- Re: Validation Rule on Table Field vs Form Control
- From: gweasel
- Re: Validation Rule on Table Field vs Form Control
- From: Larry Linson
- Validation Rule on Table Field vs Form Control
- Prev by Date: Re: Checking Values between two tables
- Next by Date: Re: JOIN query: What happens when you delete a row?
- Previous by thread: Re: Validation Rule on Table Field vs Form Control
- Next by thread: Re: Validation Rule on Table Field vs Form Control
- Index(es):
Relevant Pages
|