Results 1 to 4 of 4
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Brookline, Massachusetts, USA
    Posts
    606
    Thanks
    17
    Thanked 0 Times in 0 Posts

    Append Query (2003 SP2)

    <P ID="edit" class=small>(Edited by Howard Hillman on 03-Nov-06 20:57. )</P>I want to append the data from tblNewNames (35 rows) to tblContacts. All of the fields in both tables have the same names. When I test the query by clicking on the Datasheet View icon, the grid shows only 27 rows. As suggested by Access Help, I did not include the ID field from tblNewNames in the grid, since ID is the PK in tblContacts. (Even when I did include ID in the grid I still get only 27 rows.) There are no criteria entered, so all records should appear in the result. What am I doing wrong?
    After checking the missing records I found that their IDs in tbl NewNames coincide with deleted records in tblContacts. The two tables are joined on the ID fields.

  2. #2
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Brookline, Massachusetts, USA
    Posts
    606
    Thanks
    17
    Thanked 0 Times in 0 Posts

    Re: Append Query (2003 SP2)

    Found the problem. I changed the join from equal join to left join, which forced all of the records from tblNewNames to be appended.

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

    Re: Append Query (2003 SP2)

    When you are appending data from one table to another you don't need a Join at all.

    You start with the table containing the new data, then go to Queries...Append then nominate he destination table which does not appear in the querry grid.

    You would need a join however if some of the records in the new data were already present in the other table, and you wanted to exclude them freom the append.
    Regards
    John



  4. #4
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Brookline, Massachusetts, USA
    Posts
    606
    Thanks
    17
    Thanked 0 Times in 0 Posts

    Re: Append Query (2003 SP2)

    You are correct. I did it the hard way. Thanks for the info

Posting Permissions

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