Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Oct 2004
    Evansville, Indiana, USA
    Thanked 0 Times in 0 Posts

    Copy multiple records (2000)

    Is there a method used to copy records and store them back to the same table. I have a form that runs a query. I want to copy the records found by the query and store them back into the same table, incrementing one of the fields. Let me be more specific.

    The query displays Job#, ActCode .....
    The query selects records based on Emp#, Job#, and Week# from tblEntry
    When the user clicks btnCopyRec, I want to take the records found by the query, increment Week# and store them in the same table to be used by a different form.
    Is there a good way of doing this?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 28 Times in 28 Posts

    Re: Copy multiple records (2000)

    You can create an append query based on the query you run:
    - Create a new query, based on the query you have.
    - Select Query | Append Query
    - Specify tblEntry as the table to append to.
    - Add the fields you want to populate (except for Week#) to the query grid.
    - Access will automatically fill in the same name in the 'Append to' row.
    - In the next empty column, enter the expression


    and enter Week# in the 'Append to' row.
    - Save this query.
    - Execute this query in the On Click event of btnCopyRec, using

    DoCmd.OpenQuery "NameOfTheQuery"

    (substitute the actual name)

Posting Permissions

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