A
Andy Roberts
I have a subform that can add/edit/delete records on the parent form. There
is a button on the subform that handles the delete process. At the end I want
the code to select the main form and refresh it to recognize the changes in
the records or the remove the deleted rows. I tried the following code, but
it doesn't work and replies "The expression you entered referrs to an object
that is closed or doesn't exist."
' Close subform after deleting record
DoCmd.Close
' Select primary form
DoCmd.SelectObject acForm, "frmPledge_Main", True
' refresh primary form
me.Refresh
Thanks for you help
is a button on the subform that handles the delete process. At the end I want
the code to select the main form and refresh it to recognize the changes in
the records or the remove the deleted rows. I tried the following code, but
it doesn't work and replies "The expression you entered referrs to an object
that is closed or doesn't exist."
' Close subform after deleting record
DoCmd.Close
' Select primary form
DoCmd.SelectObject acForm, "frmPledge_Main", True
' refresh primary form
me.Refresh
Thanks for you help