M
Mercy
Hey people
This is a pretty basic question.
I have a FORM, which contains a SUBFORM. I want to be
able to check the data in the FORM against the data in
the SUBFORM. And if they don't match ... BEEP , MSGBOX ,
and force the user to enter the correct quantities by
CancelEvent. This is just so I can do a data validation
thingie.
The question is: Which event do I put this code in?
At first I put it in the "AfterUpdate" event for the
Form... but that was throwing an error before I even had
a chance to put data into the SUBFORM.
Right now I have the code in the "exit_subform" event.
But that forces me to return to the subform when the data
don't match. And that doesn't cover the case when the
error in data is in the Main form not the subform.
I am choosing the wrong event? Or am I choose the wrong
DoCmd? Maybe there's another more suitable DoCmd other
than "CancelEvent"?
Any help would be greatly appreciated! Thanks!
Mercy
This is a pretty basic question.
I have a FORM, which contains a SUBFORM. I want to be
able to check the data in the FORM against the data in
the SUBFORM. And if they don't match ... BEEP , MSGBOX ,
and force the user to enter the correct quantities by
CancelEvent. This is just so I can do a data validation
thingie.
The question is: Which event do I put this code in?
At first I put it in the "AfterUpdate" event for the
Form... but that was throwing an error before I even had
a chance to put data into the SUBFORM.
Right now I have the code in the "exit_subform" event.
But that forces me to return to the subform when the data
don't match. And that doesn't cover the case when the
error in data is in the Main form not the subform.
I am choosing the wrong event? Or am I choose the wrong
DoCmd? Maybe there's another more suitable DoCmd other
than "CancelEvent"?
Any help would be greatly appreciated! Thanks!
Mercy