Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Aug 2002
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Simple cut/paste? (2000 Sr-1a)

    I have a basic database with only 2 tables. One is for daily additions/changes and one is for archivial purposes. I would like to be able to use a date range to move records from the daily table to the archival one. I can create a form specifying the start and end date, but I cannot figure out how to use that date range to scan the daily table to find the records to cut and paste into the archival table.

    Currently I've done all the design work via Access, in other words I didn't do any programming. I'm not a programmer, just someone trying to throw something basic together. Thanks.

  2. #2
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    USA
    Posts
    379
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Simple cut/paste? (2000 Sr-1a)

    Instead of Cut and Paste, think of it as Append & Delete. You can do this by creating two queries. The first query will be an append query. Use your date criteria here and append the selected records to the Archive table. The second query will be a delete query. After you are sure that the correct records were appended use the same data criteria again to delete the selected records from Daily table.

    Make sure you have a backup so that you can recover is something goes amiss.

  3. #3
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Richland, Washington, USA
    Posts
    407
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Simple cut/paste? (2000 Sr-1a)

    If you want to stay away from coding, I'd suggest an Append query (with parameters to specify the date range) to copy the records to the archive table. Then use a Delete query (using the same parameters) to delete these records from the daily table.

    When you create the queries, use something like 'Between [Enter First Date] And [Enter Last Date]' as the criterion for the date. When you run the query, two input boxes will ask for the two dates. You'll have to enter them again for the Delete query.

    Alternatively, you could use your form to put the dates into a little "constants" table and then reference that table and those dates in your queries. This way, you'd only have to enter the dates once.

    Hope this gets you started.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •