• copy and paste by code ? (Access 2000)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » copy and paste by code ? (Access 2000)

    Author
    Topic
    #382872

    Is it possible to make a code that performs the same actions as copy and paste ? I want if possible to have a code that copies all records from the table
    table2 and pastes them into the identical table2 ?

    Viewing 0 reply threads
    Author
    Replies
    • #650678

      It sounds like you want to run an append query, but perhaps you might explain more.

      Are both tables in the same database? Why do you want each record twice?

      • #650684

        Thank you for your reply.Both tables are in the same database.The table1 is corrupted,but it is a part of a relationship, and i cannot make the relationship with tables filled with data. I am trying to evade this problem,and i am sending this code
        in another town,so the best way will be if i append all the data from the table2 into the blank table2. Can you help me writing the code ?

        regards

        • #650702

          You can’t have two tables named Table2 in the same database.

          If Table1 is corrupt, but Table2 isn’t, why do you want to copy records from Table2 into an empty table? It doesn’t make sense to me. However, as John mentioned, you wouldn’t need code for that; an append query would do what you want. If your blank table is named BlankCopyOf Table2, the SQL for the query would be

          INSERT INTO BlankCopyOfTable2 SELECT * FROM Table2

    Viewing 0 reply threads
    Reply To: copy and paste by code ? (Access 2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: