I have a button on a continuous form that appears next to each record on the form. I want it to delete the record on the same row from the source table using vba. I've tried Recordset.Delete, and I'm getting error messages. Any suggestions?
I have a button on a continuous form that appears next to each record on the form. I want it to delete the record on the same row from the source table using vba. I've tried Recordset.Delete, and I'm getting error messages. Any suggestions?
The command button wizard will build it for you, or:
CurrentDb.Execute "DELETE * FROM TableName WHERE KeyField = " & Me.KeyField
Great. Thanks. The source is actually a query. Can I just replace TableName with the query name?
You can try; the query would have to be update-able.