Results 1 to 3 of 3
  1. #1
    bigmacholmes is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    3

    Moving row to another table

    I have a database that has a completeddate field on each row.


    When the row is initially filled, the completedate will not be until the project is completed.
    After this field is updated or filled, i want to move the entire row to another table automatically.

    Is there a way to do this?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    As a general rule you shouldn't move records around. I'd leave it there and let the presence of a date there let me query for completed, uncompleted or both. If you really want to move it, you'd use an append query and then a delete query, each using that field for a criteria.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    HawkGuru is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2011
    Posts
    11
    bigmacholmes,
    I would tend to agree with Pbaldy on this one. Moving records around can lead to later problems. However, there are times when this may be a necessity. I created an employee table and an employee archive table to illustrate how this is accomplished. The SQL for the query would be:

    INSERT INTO EmployeeArchiveT ( Employee, Email, DOB, CityOfBirth, StateOfBirth, Citizenship, NOKName, NOKPhoneNumber, NOKAlternatePhoneNumber, NOKRelationship, NOKLanguageSpoken )
    SELECT EmployeeT.Employee, EmployeeT.Email, EmployeeT.DOB, EmployeeT.CityOfBirth, EmployeeT.StateOfBirth, EmployeeT.Citizenship, EmployeeT.NOKName, EmployeeT.NOKPhoneNumber, EmployeeT.NOKAlternatePhoneNumber, EmployeeT.NOKRelationship, EmployeeT.NOKLanguageSpoken
    FROM EmployeeT
    WHERE (((EmployeeT.Employee)=[Forms]![EmployeeInfoForm]![Employee]));

    You could set up a macro to first run the query and then perform the delete action for the record on the old table.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Moving records from one table to another
    By donavan01 in forum Queries
    Replies: 1
    Last Post: 02-16-2011, 01:53 PM
  2. Having trouble with moving text to table
    By geoffwbailey in forum Programming
    Replies: 3
    Last Post: 06-17-2010, 11:00 AM
  3. Moving from vs 07 to vs 97
    By Kilroy2.0 in forum Access
    Replies: 4
    Last Post: 06-04-2010, 08:42 AM
  4. Moving data from one table to another?
    By Maverick1501 in forum Access
    Replies: 2
    Last Post: 03-15-2010, 08:08 AM
  5. Moving records up
    By saqqer in forum Programming
    Replies: 0
    Last Post: 07-27-2009, 08:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums