If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Field required only if check box selected
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. |
#2
|
|||
|
|||
Field required only if check box selected
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/For...arted/200907/1 |
#3
|
|||
|
|||
Field required only if check box selected
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/For...arted/200907/1 |
#4
|
|||
|
|||
Field required only if check box selected
On Wed, 15 Jul 2009 13:05:02 -0700, 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. 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] |
#5
|
|||
|
|||
Field required only if check box selected
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 |
#6
|
|||
|
|||
Field required only if check box selected
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] |
Thread Tools | |
Display Modes | |
|
|