Question Moving data from one table to another

PapaWhiskey

New member
Local time
Today, 11:30
Joined
Jan 14, 2009
Messages
6
I am new to access, and need a little help with this project I am working on for work.

I want to be able to move an entire record from tbl_data to tbl_oldData and to clear out all information in the tbl_data record, except the primary key (str_box) when the user clicks a button.
I would try to keep the records in the same DB, however the Primary Key in tbl_data (str_box) is a needed number for information for the current and old customers, also the old customer's information needs to be kept for 1 year, 1 month and the 1st.

I am spinning my wheels on this one; any help would be greatly appreciated
 
you dont want to do this

allyou need is a yesno field in the table called completeditem or some such, and then use a query that excludes such items
 
The primary key I have set for tbl_data is str_box, and tbl_olddata which is used as the customer's P.O. Box Number, would I be able to work a way where there is a duplicate box Number 1 in tbl_data?
 
What Gemma is saying is that you don't physically move the record(s) but have a query exclude them.

If you want to move them and retain them in the original table but will all the fields set to null except ID then

A an Apend query for the selected record or records followed by an Update query to the frst table. The Update query would wipe out all the entries in the selected records. You also need to prevent "doubling up" with the Append query. You can do this by either restricting duplicates in the second table or having an entry made in a field with the update query that stops those records being appended a second time. However, the latter won't work if all the fields in the first table are set to be null.

and to clear out all information in the tbl_data record, except the primary key (str_box)
 

Users who are viewing this thread

Back
Top Bottom