dominicdunmow
Technical User
Hi,
I have a 'Delete' command button on a form which I want to use to transfer a record to another table and then delete it from the original table.
The From contains a subform though, so I can delete the data
from the record that is stored in the parent form using DoCmd.RunSQL "INSERT INTO... then deleting the record.
But I can't work out how to delete the subform record. The link between the form and subform is the field "OPP ID" but I gather I can't use an DoCmd.RunSQL "INSERT INTO with a WHERE clause.
My logic would have been to delete the subform record where Opp ID = Opp ID in the main form but it doesn't seem to work (missing semicolon error message)
Can anyone help please?
I have a 'Delete' command button on a form which I want to use to transfer a record to another table and then delete it from the original table.
The From contains a subform though, so I can delete the data
from the record that is stored in the parent form using DoCmd.RunSQL "INSERT INTO... then deleting the record.
But I can't work out how to delete the subform record. The link between the form and subform is the field "OPP ID" but I gather I can't use an DoCmd.RunSQL "INSERT INTO with a WHERE clause.
My logic would have been to delete the subform record where Opp ID = Opp ID in the main form but it doesn't seem to work (missing semicolon error message)
Can anyone help please?