J
JoeA2006
I have built a form with multiple subforms that the user can change which
subform a record appears. Using the following code for each subform,in the
afterUpdate event of the combo box ,the user can both enter a new record,
edit and existing record or change the subform the record appears in. I have
set the tab order so the combo box gets focus last in the current record. The
error occurs when I remove the last record from the subform. How do I avoid
an error in this situation.
Me.Requery
DoCmd.RunCommand acCmdRecordsGoToNew
Forms!Form1.[SubformA].Requery
Forms!Form1.[SubformB].Requery
subform a record appears. Using the following code for each subform,in the
afterUpdate event of the combo box ,the user can both enter a new record,
edit and existing record or change the subform the record appears in. I have
set the tab order so the combo box gets focus last in the current record. The
error occurs when I remove the last record from the subform. How do I avoid
an error in this situation.
Me.Requery
DoCmd.RunCommand acCmdRecordsGoToNew
Forms!Form1.[SubformA].Requery
Forms!Form1.[SubformB].Requery