WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Field required only if check box selected

 
   Home -> Office other -> Getting Started RSS
Next:  Not To Mess Up by Replacing Relationships with Di..  
Author Message
Breezy

External


Since: Aug 14, 2006
Posts: 7



(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.
Back to top
Login to vote
bhicks11 via AccessMonste

External


Since: Jun 20, 2008
Posts: 189



(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

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
Back to top
Login to vote
Breezy

External


Since: Aug 14, 2006
Posts: 7



(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
>
>
Back to top
Login to vote
John W. Vinson

External


Since: Jan 29, 2004
Posts: 4665



(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

--

John W. Vinson [MVP]
Back to top
Login to vote
bhicks11 via AccessMonste

External


Since: Jun 20, 2008
Posts: 189



(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.

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
>

--
Message posted via http://www.accessmonster.com
Back to top
Login to vote
John W. Vinson

External


Since: Jan 29, 2004
Posts: 4665



(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
>>
--

John W. Vinson [MVP]
Back to top
Login to vote
Display posts from previous:   
       Home -> Office other -> Getting Started 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
Categories:
 Windows XP
 Windows Vista
 Windows Other
 Office
  Office Other
 Security
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET |
  • IT Support