T
Tim
I have made some research, but I haven't gotten what I am looking for. I have
a main form and a subform. In the subform, I have many text fields that I
need to do the validation, i.e., the user must enter the data; the field can
not be empty. My question is where should I put the VBA codes? In the main
form or the sub form?
I know that I should use the BeforeUpdate event and set Cancel = True, but I
don't know where I put my codes. Also, besides the BeforeUpdate event, should
I use the Exit event for the specific textbox? I have 10 text boxes to do the
validation. If I use the Exit event, then I have to write some codes for this
event in the subform.
Thank you for your help in advance. tim
a main form and a subform. In the subform, I have many text fields that I
need to do the validation, i.e., the user must enter the data; the field can
not be empty. My question is where should I put the VBA codes? In the main
form or the sub form?
I know that I should use the BeforeUpdate event and set Cancel = True, but I
don't know where I put my codes. Also, besides the BeforeUpdate event, should
I use the Exit event for the specific textbox? I have 10 text boxes to do the
validation. If I use the Exit event, then I have to write some codes for this
event in the subform.
Thank you for your help in advance. tim