Brookelyn
The Trying One
- Local time
- Today, 05:47
- Joined
- Jan 24, 2006
- Messages
- 14
Hi,
I am creating a database in which every time an item gets deleted from the main table, it will be added to a different table. The code example I have at the bottom does ALL the files in that table. How do I get only the current record that I am on to move? I have tried do while, with endwith, and all the others and it still moves every record. Please help.
Thanks in advance!!!
Dim intCount As Variant
intCount = Me.ID
With intCount = intCount
SQLArchive = "INSERT INTO [Deleted]" & _
"SELECT [Store Data].ID, [Store Data].Code, [Store Data].Name FROM [Store Data];"
intCount = ""
DoCmd.RunSQL (SQLArchive)
End With
I am creating a database in which every time an item gets deleted from the main table, it will be added to a different table. The code example I have at the bottom does ALL the files in that table. How do I get only the current record that I am on to move? I have tried do while, with endwith, and all the others and it still moves every record. Please help.
Thanks in advance!!!


Dim intCount As Variant
intCount = Me.ID
With intCount = intCount
SQLArchive = "INSERT INTO [Deleted]" & _
"SELECT [Store Data].ID, [Store Data].Code, [Store Data].Name FROM [Store Data];"
intCount = ""
DoCmd.RunSQL (SQLArchive)
End With