S
Steven
I have a form with a subform. I have run into an issue where I frequently
get an errror message when I try to "Clean Up" the Table that is the
RecordSource of the SubForm. By "Clean Up" I mean that I have a DoCmd.RunSQL
"DELETE ....." deleting some of the records WHERE certain condition(s)
exists. The problem is that sometimes in the "Clean Up" process it will give
me an error message saying that "Cannot perform procedure. One or more of
the records in the underlying table is being edited." I think is is because
Subform/Field2 has code on the OnExit event and if a user clicks from the
MainForm to Subform/Field2 and then clicks back to the main form it hangs up
the record in an edit mode. Does that sound like it might be the situation?
It seems to run ok if the user clicks on Subform/Field2 and then goes to
Subform/Field3 and then back to the MainForm. How do I handle this so if the
MainForm has the focus and then the user clicks directly to Subform/Field2
and then immediately back to the MainForm it will not error in the "Clean Up"
process. But, I really want to keep the code on the OnExit event of
Subform/Field2.
Thank you for your help,
Steven
get an errror message when I try to "Clean Up" the Table that is the
RecordSource of the SubForm. By "Clean Up" I mean that I have a DoCmd.RunSQL
"DELETE ....." deleting some of the records WHERE certain condition(s)
exists. The problem is that sometimes in the "Clean Up" process it will give
me an error message saying that "Cannot perform procedure. One or more of
the records in the underlying table is being edited." I think is is because
Subform/Field2 has code on the OnExit event and if a user clicks from the
MainForm to Subform/Field2 and then clicks back to the main form it hangs up
the record in an edit mode. Does that sound like it might be the situation?
It seems to run ok if the user clicks on Subform/Field2 and then goes to
Subform/Field3 and then back to the MainForm. How do I handle this so if the
MainForm has the focus and then the user clicks directly to Subform/Field2
and then immediately back to the MainForm it will not error in the "Clean Up"
process. But, I really want to keep the code on the OnExit event of
Subform/Field2.
Thank you for your help,
Steven