Archive record

TimjHebert

Registered User.
Local time
Today, 00:06
Joined
Dec 12, 2004
Messages
40
Happy New Year everyone!

I would like to archive a record from a form with a button. With this same button, i would also like to have code to some how flag the record so it does not show back up in the active table. How can I accomplish this?

Thanks,
Tim
 
Tim,

A lot of this depends on your table structures. Do you have a
seperate Archive table? What do you mean by "Flag the record so
that it doesn't show up in the Active table?

You command button can do a DoCmd.RunSQL "Insert Into Archive..."
statement to move the record and either delete (or set a flag) in
the original table's record.

Need more info.
Wayne
 
Archive records

Hi Wayne!

Thanks for your input. I do have an archive table. when i say i dont want it to show in the active table, i dont want it to show up on my form. My tables are set up as tblrent and tblarchive.

thanks,
Tim
 
Simple 'Flag'

Hello,
I have made a simple database structure in the past that may help. Now, I only used one table which contained all of the records - No matter if they were 'archived' or not. I just added another field of which was called 'archive'. By default (in the table), this field would = "No" but once you select archive on the main form, it would change that value to "Yes". The main form gets it data via a 'master' query that is set up to only find those records that have "No" in the archive field. Thus, once you change that value via that button (or drop down, etc) to "Yes", it will no longer retrieve that record. I had also made a separate form that retrieved only the archived records which had an option on it to 're-open' the record - Which basically had a button on it to change that value back to = "No" and then the master query would retrieve it again. Hope this helps - I thought it was a very simple method that way I only needed one table and it doesn't take much coding at all to do this.

---roystreet
 

Users who are viewing this thread

Back
Top Bottom