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
|
|||
|
|||
form coding on before update
Hi everyone. I have a yes/no field on my form with 3 number fields related
to the the yes/no form. If the the yes/no form is True then i would like at least one of the three number fields to have a number greater than 0. I have it set so that if the yes/no is false it automatically sets the three number fields to 0 but i am trying to set a rule that forces you to enter a number in one or more of the three fields. Can someone give me a push in the right direction? Thank you! |
#2
|
|||
|
|||
form coding on before update
You can use the form BeforeUpdate event to check if the fields are filled, if
not then stop the process If Me.[CheckBoxName] = True And (Nz(me.[TextBox1],0) + Nz(me.[TextBox2],0) + Nz(me.[TextBox3],0) = 0) then MsgBox "You need to apply a number" Cancel = True ' Stop the process End If -- Good Luck BS"D "scott04" wrote: Hi everyone. I have a yes/no field on my form with 3 number fields related to the the yes/no form. If the the yes/no form is True then i would like at least one of the three number fields to have a number greater than 0. I have it set so that if the yes/no is false it automatically sets the three number fields to 0 but i am trying to set a rule that forces you to enter a number in one or more of the three fields. Can someone give me a push in the right direction? Thank you! |
Thread Tools | |
Display Modes | |
|
|