Re: Mandatory Fields
- From: "Wayne Morgan" <comprev_gothroughthenewsgroup@xxxxxxxxxxx>
- Date: Mon, 14 Nov 2005 16:38:45 -0600
This can be done, but I recommend against it. What if the person selects the
option by mistake then tries to change it to Yes or No? You have now
prevented them from doing anything except filling in the textbox, which is
actually no longer applicable because they are trying to choose Yes or No.
Yes, the could press Esc to cancel the record, but then they get to start
all over again.
The best way is to make them fill in the textbox prior to saving the record.
To do this, use the form's BeforeUpdate event. Check the value of the option
and if it is the "unable..." option, check the value of the textbox to see
if an entry has been made. If not, Cancel the update, use a MsgBox to advise
the user of the problem, and set the focus to the textbox.
--
Wayne Morgan
MS Access MVP
"MannyD" <MannyD@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:8851311A-BFFC-46CD-AEFF-92439996DC6D@xxxxxxxxxxxxxxxx
> I'm trying to create an Access form that, when a person checks an 'unable
> to
> determine' checkbox, Access will prevent the user from proceeding with the
> form until they explain in an adjacent text box why they selected 'unable
> to
> determine'. If the user selects from the other two options (yes or no),
> they
> do not need to fill out the text box.
>
> Any ideas (hopefully an easy solution!)?
>
> Thanks!
>
.
- Prev by Date: Re: default user code in form
- Next by Date: Re: Add a record to a filtered form?
- Previous by thread: Re: default user code in form
- Next by thread: Re: Mandatory Fields
- Index(es):
Relevant Pages
|