Archiving records.

G

Guest

Is it possible to archive records?

Here's my table and two of the fields:
tblProfiles.txtProfileID(p).txtVersion

What I'd like to do is archive a record whenever the version is changed. For example, let's say txtProfileID is 205055 with txtVersion as 000. I'd like to revise 205055 to a new version which I'll call 001.

Upon changing the version, can Access archive the 205055-000 record and all it's subrecords so that the new version 205055-001 is the most current in tblProfiles and it's related tables?
 
G

Guest

i don't know of an in-built archiving feature in Access. what you can do is make a seperate database, linking to those tables in the same front end. you can make the key of the archive table based on the txtProfileID and txtVersion. when you want to edit the records, run an action query like
currentdb.execute "insert into tblProfilesArchive(ProfileID, txtVersion, field3) select ProfileID, txtVersion, field3 from tblProfiles WHERE ProfileID=[CurrentProfileID]
you would need to replace the parameter at the end with the relevant value
as the parent key is based on the profile and version, it would stop you trying to archive the same details twice
once you run the query, you can change the current version of profiles
currentdb.execute "update tblProfiles set txtVersion=txtVersion+1 WHERE ProfileID=[CurrentProfileID]" - again, supplying the parameter

----- JohnLute wrote: ----

Is it possible to archive records

Here's my table and two of the fields
tblProfiles.txtProfileID(p).txtVersio

What I'd like to do is archive a record whenever the version is changed. For example, let's say txtProfileID is 205055 with txtVersion as 000. I'd like to revise 205055 to a new version which I'll call 001

Upon changing the version, can Access archive the 205055-000 record and all it's subrecords so that the new version 205055-001 is the most current in tblProfiles and it's related tables?
 

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