philfer
02-02-2012, 07:01 AM
Hello,
I have a form with a subform on it
On the subform I have a button which I can add a record
The added record appears with a button (which is on the subform) that allows the user to delete it.
Everything works well unless the user is on one of the controls of the record to be deleted. Then I get the above error.
I have tried to move the focus away from the record but cant get it to delete without this error
I first tried to move the focus to the "add" button of the subform but get the same error
I then try to move focus to a control on the main form.
This works fine unless the user is in a control in the subform record to be deleted in which case I get a 2110 cant move forcus to the control error.
The thing that is causing me these problems is if the user is in a control on the record in the subform that is to be deleted
Is use DoCmd.RunSQL "DELETE * ....." to do the delete but have tried it using a saved query and get the same problem....again only if the user is in a control on the subform record to be deleted
Its driving me crazy!!
Any help
P
I have a form with a subform on it
On the subform I have a button which I can add a record
The added record appears with a button (which is on the subform) that allows the user to delete it.
Everything works well unless the user is on one of the controls of the record to be deleted. Then I get the above error.
I have tried to move the focus away from the record but cant get it to delete without this error
I first tried to move the focus to the "add" button of the subform but get the same error
I then try to move focus to a control on the main form.
This works fine unless the user is in a control in the subform record to be deleted in which case I get a 2110 cant move forcus to the control error.
The thing that is causing me these problems is if the user is in a control on the record in the subform that is to be deleted
Is use DoCmd.RunSQL "DELETE * ....." to do the delete but have tried it using a saved query and get the same problem....again only if the user is in a control on the subform record to be deleted
Its driving me crazy!!
Any help
P