(Msg. 1) Posted: Wed Jul 15, 2009 1:05 pm
Post subject: Field required only if check box selected Archived from groups: microsoft>public>access>gettingstarted (more info?)
I need to make one field required on my form only if the user checks the box
as complete. I would like to have something pop up and ask for the RO# that
they used to complete the work. I have the field on the form but do not know
how to make it required after selecting complete.
(Msg. 2) Posted: Wed Jul 15, 2009 7:05 pm
Post subject: Re: Field required only if check box selected [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
Put in the checkbox OnChange Event. Something like:
If isNull(me.whatever) then
msbox "this value is required"
me.whatever.setfocus
end if
Breezy wrote:
>I need to make one field required on my form only if the user checks the box
>as complete. I would like to have something pop up and ask for the RO# that
>they used to complete the work. I have the field on the form but do not know
>how to make it required after selecting complete.
(Msg. 3) Posted: Thu Jul 16, 2009 6:34 am
Post subject: Re: Field required only if check box selected [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
Thanks!!
"bhicks11 via AccessMonster.com" wrote:
> Put in the checkbox OnChange Event. Something like:
>
> If isNull(me.whatever) then
> msbox "this value is required"
> me.whatever.setfocus
> end if
>
> Bonnie
> http://www.dataplus-svc.com >
> Breezy wrote:
> >I need to make one field required on my form only if the user checks the box
> >as complete. I would like to have something pop up and ask for the RO# that
> >they used to complete the work. I have the field on the form but do not know
> >how to make it required after selecting complete.
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-gettingstarted/200907/1 >
>
(Msg. 4) Posted: Fri Jul 17, 2009 10:19 am
Post subject: Re: Field required only if check box selected [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
On Wed, 15 Jul 2009 13:05:02 -0700, Breezy <Breezy.RemoveThis@discussions.microsoft.com>
wrote:
>I need to make one field required on my form only if the user checks the box
>as complete. I would like to have something pop up and ask for the RO# that
>they used to complete the work. I have the field on the form but do not know
>how to make it required after selecting complete.
Since the two controls could be filled out in either order, your best bet is
to put the check in the Form's (not either control's) BeforeUpdate event: e.g.
Private Sub Form_BeforeUpdate(Cancel as Either)
If Me!chkComplete = True AND If Me!txtRONumber & "" = "" Then
Cancel = True
MsgBox "Please fill in the RO#", vbOKOnly
End If
End Sub
(Msg. 5) Posted: Fri Jul 17, 2009 2:05 pm
Post subject: Re: Field required only if check box selected [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
I understood him to say that he wanted to check if RO# was filled out when
the COMPLETE box.
John W. Vinson wrote:
>>I need to make one field required on my form only if the user checks the box
>>as complete. I would like to have something pop up and ask for the RO# that
>>they used to complete the work. I have the field on the form but do not know
>>how to make it required after selecting complete.
>
>Since the two controls could be filled out in either order, your best bet is
>to put the check in the Form's (not either control's) BeforeUpdate event: e.g.
>
>Private Sub Form_BeforeUpdate(Cancel as Either)
>If Me!chkComplete = True AND If Me!txtRONumber & "" = "" Then
> Cancel = True
> MsgBox "Please fill in the RO#", vbOKOnly
>End If
>End Sub
>
(Msg. 6) Posted: Fri Jul 17, 2009 8:58 pm
Post subject: Re: Field required only if check box selected [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
On Fri, 17 Jul 2009 17:20:59 GMT, "bhicks11 via AccessMonster.com"
<u44327@uwe> wrote:
>I understood him to say that he wanted to check if RO# was filled out when
>the COMPLETE box.
That's exactly what I understood as well. I called the COMPLETE box
chkComplete - the OP should use whatever the name of the control might be.
>Bonnie
>http://www.dataplus-svc.com
>
>John W. Vinson wrote:
>>>I need to make one field required on my form only if the user checks the box
>>>as complete. I would like to have something pop up and ask for the RO# that
>>>they used to complete the work. I have the field on the form but do not know
>>>how to make it required after selecting complete.
>>
>>Since the two controls could be filled out in either order, your best bet is
>>to put the check in the Form's (not either control's) BeforeUpdate event: e.g.
>>
>>Private Sub Form_BeforeUpdate(Cancel as Either)
>>If Me!chkComplete = True AND If Me!txtRONumber & "" = "" Then
>> Cancel = True
>> MsgBox "Please fill in the RO#", vbOKOnly
>>End If
>>End Sub
>>
--
All times are: Eastern Time (US & Canada) (change)
Page 1 of 1
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum