Re: REQUIRED field(s) in FORMS
- From: "smags" <smags@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 14 Jul 2005 20:16:02 -0700
The problem is that I have REQUIRED set to YES, but when I test it no errors
arise. What am I doing wrong? I can leave the field blank with no problems
saving the record.
--
smags
"Rick Brandt" wrote:
> smags wrote:
> > I want a field on my FORM to have data REQUIRED to be entered. It's
> > a COMBO BOX with a drop down list of options. I want the user to
> > HAVE TO select one of the options in the drop down box. If the user
> > doesn't select one of the options in the drop down box, then I don't
> > want the user to be able to go to the next field.
> >
> > I went into the TABLE for the field (BENEFICIARYNAME). The DATA TYPE
> > under the field BENEFICIARYNAME says "text," yet I have it as a COMBO
> > BOX for the FORM (I don't know if that matters...the form displays
> > the info I need). Anyhow, I changed the REQUIRED line to read YES.
>
> Okay so far, but making the field required will only raise an error when the
> user saves the record. They will still be able to tab into and out of the
> ComboBox without making an entry. Once they make an entry though they will not
> be allowed to clear it and if they don't make a selection they will not be able
> to leave the record or close the form without cancelling the record or making an
> entry in the Required field. This is the recommended approach to take.
>
> > In the FORM, the COMBO BOX has the CONTROL SOURCE as BENEFICIARYID,
> > not BENEFICIARYNAME (yet the info displayed is the NAME and not the
> > ID). The ROW SOURCE TYPE is TABLE/QUERY and the ROW SOURCE is
> > BENEFICIARIES QUERY.
>
> It is very common for ComboBoxes and ListBoxes to display one value while
> storing another. Your current setup is again the correct way to set it up.
>
> >
> > When I go into the BENEFICIARIES QUERY there's no option to make
> > anything REQUIRED.
>
> Correct. Required fields are determined at the Table level and any Qery based
> on the Table will inherit that same rule. The Query is merely a "window" on the
> Table after all.
>
> > Also, while in the TABLE, do I need to do anything with the
> > VALIDATION RULE? I would like an error message displayed if the user
> > does NOT select one of the drop down options.
>
> A Validation rule will not work here for a couple reasons. The error for
> "Required" would fire before the validation rule anyway and validation rules
> only kick in when the user actually enters something, not when they fail to do
> so. The built in error message for a missing Required field is pretty easy to
> understand, but if you wanted a custom one you could check for problems in the
> BeforeUpdate event of the form and display any message you want.
>
> --
> I don't check the Email account attached
> to this message. Send instead to...
> RBrandt at Hunter dot com
>
>
>
>
.
- Follow-Ups:
- Re: REQUIRED field(s) in FORMS
- From: Rick Brandt
- Re: REQUIRED field(s) in FORMS
- References:
- REQUIRED field(s) in FORMS
- From: smags
- Re: REQUIRED field(s) in FORMS
- From: Rick Brandt
- REQUIRED field(s) in FORMS
- Prev by Date: keeping duplicate records from being appended
- Next by Date: Table for combobox fields
- Previous by thread: Re: REQUIRED field(s) in FORMS
- Next by thread: Re: REQUIRED field(s) in FORMS
- Index(es):
Relevant Pages
|