Results 1 to 5 of 5
  1. #1
    Star Lounger
    Join Date
    Nov 2002
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    copy data to table (Access 2002)

    Hi. I have been able to copy data from one (table A) table to another w/o problems.....now i have 2nd table (table [img]/forums/images/smilies/cool.gif[/img] that i would also like to copy data from and paste into the original destination table (table C). The fields from this 2nd table ([img]/forums/images/smilies/cool.gif[/img] contain all the same names, data types, properties, etc. as those from my original first table (A), but despite this, i keep getting an error message which reads: "Records that Thoracic Medicine Database was unable to paste have been inserted into a new table called 'paste errors'. In the database window, open the new table to see the unpasted records. After you fix the problems that resulted in the paste errors, copy and paste the records from the new table." I am trying to do this from a form which, when i run an the click event procedure, copies the record then paste it into the destination table . This procedure is so we can keep track of those patients who did not show up for their appointments (data kept in Table C). Any help would be greatly appreciated. Regards, Van

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: copy data to table (Access 2002)

    It is not clear exactly what you need help with.

    When you look at the importerrors table, can you tell why the records did not imported?

    There is absolutely no need to be using multiple tables for teh task you describe. Your table can just have a yes/No field Attended which you click when the patient attends. You can then use queries to show you those who did attend, those who did not etc.
    Regards
    John



  3. #3
    Star Lounger
    Join Date
    Nov 2002
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: copy data to table (Access 2002)

    Thanks John, I'm beginning to see that what you've suggested would be a better way. Just not sure why the way i've set it up isn't working. The import errors table offers no help as to why the record wasn't pasted. I've just been doing some more testing, and all works fine if i manually copy and paste field by field, just not when i copy the entire record then try to paste. ugh!

  4. #4
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: copy data to table (Access 2002)

    When you try to paste the whole record do you use "paste append" or just paste?

    Are you able to post a stripped down version of your db to have a look at.

    Just a few records in each of the tables (with any confidential stuff modifed) and the form that contains the code.
    Regards
    John



  5. #5
    Star Lounger
    Join Date
    Nov 2002
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: copy data to table (Access 2002)

    Hi John, here is the code...just using paste. Thanks for your help and suggestion. i've started to collect this data just using a query as you've suggested and this seems to be working out much better. Thanks again. Regards, Van

    Private Sub ns1_Click()
    RunCommand acCmdSelectRecord
    RunCommand acCmdCopy
    DoCmd.OpenTable "no show psg"
    DoCmd.GoToRecord , , acNewRec
    RunCommand acCmdSelectRecord
    RunCommand acCmdPaste
    DoCmd.close

    End Sub

Posting Permissions

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