archiving data

D

Daniel M

I have a spreadsheet that lists serial numbers. I can import that into a tmp
table in access, but what i need to do is search my main serialnumber table
and find all instances of the data and append it to an archive table and then
delete the data from the main table.

I have a query that inner joins a temp table and a main table and updates
the phone number from the temp table to the main table. I was thinking
something like this but i dont know exactly how to do it. any help? I would
like to put this behind a button. thanks.
 
M

Mike Painter

Daniel said:
I have a spreadsheet that lists serial numbers. I can import that
into a tmp table in access, but what i need to do is search my main
serialnumber table and find all instances of the data and append it
to an archive table and then delete the data from the main table.

All instances of what data?
The records that match the Excel information or???

In any event unless you have a HUGE table, it is probably easier to just add
an "Archive?" field to your table and base your foms and reports on
fldArchieve = False
 
D

Daniel M

Let me backup and start again.

I have a main table with several thousand records with fields ID,
Serialnumber, TelNumber, Serialnumber2,Location.

We are currently deactivating some units and reactivating them with new
serialnumbers and telnumbers. I dont want to keep the old records in the
table as they are obsolete and shouldnt be needed every again. But you never
know, so i dont want to just delete them either.

As i deactivate them i get a spreadsheet with serialnumber,
telnumber,serialnumber2. I would like to look up those values in the main
table and export them along with the other fields to an archive table. then
delete them from the main table.
 
M

Mike Painter

Daniel said:
Let me backup and start again.

I have a main table with several thousand records with fields ID,
Serialnumber, TelNumber, Serialnumber2,Location.

We are currently deactivating some units and reactivating them with
new serialnumbers and telnumbers. I dont want to keep the old records
in the table as they are obsolete and shouldnt be needed every again.
But you never know, so i dont want to just delete them either.
As i deactivate them i get a spreadsheet with serialnumber,
telnumber,serialnumber2. I would like to look up those values in the
main table and export them along with the other fields to an archive
table. then delete them from the main table.


I'm going to guess that this is a manual process and that you use a Boolien
field to deactivate them.
Build an append query to your archieve table and append for Deactivate =
True.
Then run a delete query on the main table with the same criteria.

Alternatively you could simply change the serial number and TelNumber in the
table.
This assumes, and is one good example of why, a serial number is rarely a
good key field.

I also makes the assumption that noody ever uses an old serial number for
any reason.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top