Originally Posted by
danaspps
I have a form with a field named Inactive. It is a Yes/No field. If Yes, I want the record to append to a different table and to be deleted from the original table. The point is to have only active records when I open the form, but I don't want to completely delete the inactive records. I copied the original table (structure only) and named it Inactive. Added the Inactive field to the form. Created an Append Query and a Delete Query. When I run the queries they work as expected. I would like to have the queries run automatically when I close the form.
I tried creating a Macro using RunSQL but when I copy the SQL View from the queries into the SQL Statement of the macro, it only copies the first line. I then went to the properties for the form and put the macro name next to OnClose, but when I close the form I get Syntax Error in INSERT INTO statement.