Move a Record from one table to another? (1 Viewer)

ChampionDuy

Registered User.
Local time
Today, 15:44
Joined
Mar 14, 2002
Messages
94
I cant figure out how to take a record that is in one table and move the entire record to another table. Can I use a parameter query for this. I tried one with an update statement but it did not work. It also needs to delete the record from the table that it comes from.
 

ChampionDuy

Registered User.
Local time
Today, 15:44
Joined
Mar 14, 2002
Messages
94
How would I add the delete to the Query? Here is my SQL that appends the record. It works great. Now I just need to delete it from the original table called Casefile. Can I just do a delete right after that statement?


Parameters [Enter CCN of the case you would like to close] value;
INSERT INTO CASE1
SELECT CASEFILE.*
FROM CASEFILE
where casefile.ccn = [Enter CCN of the case you would like to close] ;
 

David R

I know a few things...
Local time
Today, 09:44
Joined
Oct 23, 2001
Messages
2,633
The delete query will have the exact same WHERE clause as the Append query, for reasons which should be obvious. Run them right after each other from code or a macro.

It will help to have a way to refer to that case file number again, instead of them having to enter it again. You can do this with input boxes, popup forms, or a button from an existing bound form showing the record in question.

[This message has been edited by David R (edited 05-16-2002).]
 

Users who are viewing this thread

Top Bottom