Using Access2003 I have a form that contains 1 sub form. There is a one to many relationship between the forms paretn and child links. When I try to delete the last record from the subform using the following code:
RunCommand acCmdDeleteRecord
The cursor stays in the subform and thus there is an empty record if I try to leave the form or go to a control in the main form I receive the error telling me it can't find the matching key fields. Is there a way to delete the last record in the subform and not have the new record in the subform. Just setting the focus to the main form doesn't work.
Thanks
RunCommand acCmdDeleteRecord
The cursor stays in the subform and thus there is an empty record if I try to leave the form or go to a control in the main form I receive the error telling me it can't find the matching key fields. Is there a way to delete the last record in the subform and not have the new record in the subform. Just setting the focus to the main form doesn't work.
Thanks