I have two tables, with the exact same columns (Open Tickets and Closed_Tickets). I want to be able to click a button on the Open Tickets form and move the active record to the Closed_Tickets table and delete the record from the Open Tickets table if the Insert was successful.
I know it would be easier to use a status field, but this is what the customer wants to do.
So far I have a Command button that executes the code in the code box below but I get the following error: "Syntax Error (missing operator) in query '[Open Tickets].TicketNumber=& Me![TicketNumber]'
Please see my code and help me expand it :) Thanks!
Private Sub Command119_Click()
On Error GoTo Err_Command119_Click
DoCmd.RunSQL "Insert Into [Completed_Tickets] Select * from [Open Tickets] where [Open Tickets].[TicketNumber]=& Me![TicketNumber]"