G
Guest
I need some guidance on error handling. (Access 2000 SP3)
A form opens up, and the user is supposed to enter something in the form
header before they start entering records. If they enter data in the body of
the form, I want to test that the header field has been filled in; if not, I
want to pop up a dialog box AND CANCEL their data entry, so it doesn't
generate another error. The user can hit Escape a couple of times to cancel
the data, but I want to spare them that.
Q1: Which property of the form do I use? "Before Insert"? "On dirty"?
Other?
Q2: What code should I put in the associated module to cancel the data
entry once I determine it is necessary?
Q3: Is there a guide to best practice on this kind of thing somewhere?
Thanks!
A form opens up, and the user is supposed to enter something in the form
header before they start entering records. If they enter data in the body of
the form, I want to test that the header field has been filled in; if not, I
want to pop up a dialog box AND CANCEL their data entry, so it doesn't
generate another error. The user can hit Escape a couple of times to cancel
the data, but I want to spare them that.
Q1: Which property of the form do I use? "Before Insert"? "On dirty"?
Other?
Q2: What code should I put in the associated module to cancel the data
entry once I determine it is necessary?
Q3: Is there a guide to best practice on this kind of thing somewhere?
Thanks!