Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Append Query on Related Tables
Michael Medici 
     
12 months ago
Hi all,

Question on Append Queriews.  I have 2 tables, Quotes and QuoteNotes that are related (enforced referencial, etc) and I would like to archive old data to 2 similar tables that are the same name, but end in Archive.  I know how to do a simple append query, but this may be a bit involved.

Any suggestion?
Sami Shamma  @Reply  
             
12 months ago
Michael check out the following video:
Archive Records
Michael Medici OP  @Reply  
     
12 months ago
Thanks Sami, but not quite what I am looking for.  I want to be able to archive old data from 2 related tables into 2 Archive tables.  Basically if the master record is archived, I want to archive the child record.  The videos, which I had previously viewed, only talk about how to archive 1 table using the append query and then how to tell which record you are viewing (current or archive).  Big difference from what I am looking to do.
John Campbell  @Reply  
     
12 months ago
I am assuming you have a proper relationship between the 2 tables?  If so, then build a tmp table from the Main table of those records you want to archive using a make table query.  Then, take the tmp table from the main table and link it to the 2nd table and build a table that would essentially be the archive table of the 2nd table.

Once you have those created, then link the tmp table 1 to the main table and delete those records.  Then take that table and link to the 2nd table and purge those records.
Michael Medici OP  @Reply  
     
12 months ago
Thanks John.  I'll give it a try.
Bryan Enbey  @Reply  
     
12 months ago
If you are familiar w/ VBA, this can be done in a button, or a series of queries can be run in a specific order to perform all the necessary tasks.  Please do yourself a favor and get the new functionality working in a copy of your original database, so that no loss of data can occur during development until confirming everything performs as planned.

• Append Query to + records to QuoteArchive where criteria = checkbox, date or other value determines archivability
• Append Query to + records to QuoteNotesArchive where unique relationship field in QuoteNotes=QuoteArchive
• Delete Query to – records from QuoteNotes where unique relationship field in QuoteNotes=QuoteNotesArchive
• Delete Query to – records from Quote where unique relationship field in Quote=QuoteArchive

Suggesting the latter 3 steps to be a WHERE using the unique relationship field, so that if the queries were to inadvertently be run out of order, no deletions can be performed on records not already carried over.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 6/17/2026 10:34:42 AM. PLT: 1s