Firstly you need to create an update query that will set the 'archive' field to -1 (active). You also need to decide which records you want to archive, do you want to archive them all? Otherwise, set a criteria parameter. Once you're done, save the query.
Secondly, on the OnClose event for...