Let's say my table has a primary key (yes it is text field called NAME, not a number field). Then what would I use instead of using the current record's ID in my code? Please be specific. Here is what I have so far to transfer record to different table before deleting it from main table.
Both of these commands can be on one button click:
Private Sub cmdDoIt_Click()
CurrentDB.Execute "INSERT INTO tblArchive SELECT * FROM tblThisTable WHERE ID =" & Me!ID
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdDelete
End Sub
ALL IS UNDERSTOOD EXCEPT AFTER the WHERE. THank you
Both of these commands can be on one button click:
Private Sub cmdDoIt_Click()
CurrentDB.Execute "INSERT INTO tblArchive SELECT * FROM tblThisTable WHERE ID =" & Me!ID
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdDelete
End Sub
ALL IS UNDERSTOOD EXCEPT AFTER the WHERE. THank you