Question : Move a record and delete

I am trying to create a command button that moves a record to a blank exactly replicated structured table for arciving and once it has been moved and the script verifies it the currect record is then deleted. Any help one this would be greatly appreciated. Thanks.

Answer : Move a record and delete

to move the current record

currentdb.execute "insert into tblArchived select * from tblActive where [Primary Key]=" & me.[Primary Key]

to delete the current record
currentdb.execute "delete * from tblActive where [Primary Key]=" & me.[Primary Key]


*  again you have to change the name of the table to the actual names of your tables.
Random Solutions  
 
programming4us programming4us