Results 1 to 4 of 4

Thread: Append Query

  1. #1
    Join Date
    Jun 2008
    Posts
    59

    Unanswered: Append Query

    I AM HAVING TROUBLE TRYING TO APPEND DATA FROM ONE TABLE TO ANOTHER?
    I HAVE TWO TABLES TABLE A AND TABLE B.TABLE A HAS 122 NAMES AND TABLE B HAS IDENTICAL FIELDS BUT NO DATA AS YET.
    I CREATED A SELECT QUERY FOR BOTH AND THEN CHANGED QUERY A TO AN APPEND QUERY THE SQL THEN READ
    INSERT INTO [LIST BOX B]
    SELECT
    FROM [LIST BOX A] INNER JOIN [List Box B] ON [LIST BOX A].[Members bowls data] = [List Box B].[Members bowls data]
    WHERE ((([LIST BOX A].[Full Name])="FULL NAME"));
    IT IS NOT WORKING
    I practised using northwind following the same procedure and it worked!!
    i also get a message sometimes that my sql server is not connected but if this is so why does northwind work?
    as you can see i am a newbie at this but would like to improve my knowledge of access many thanks dennis

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    What does "IT IS NOT WORKING" mean?? Is there an error message?

    Also, I think you need to specify some fields.

    Code:
    INSERT INTO [LIST BOX B]
    SELECT *
    FROM [LIST BOX A] INNER JOIN [List Box B] ON [LIST BOX A].[Members bowls data] = [List Box B].[Members bowls data]
    WHERE [LIST BOX A].[Full Name]="FULL NAME";
    I dunno what is going on here... the forums seem to be stripping spaces away from even code
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Jun 2008
    Posts
    59
    Tks Starr Trekker,when i create the append query and click on run i get the following
    microsoft jet base engine cannot find the input table or query"list box B"make sure it exists or spelt correctly
    also if i copy and paste your code into the sql statement it removes all the spaces??help and thanks! dennis

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Ok, so you are referencing tables that don't exist.

    Oh, and I just realised you don't need both tables included anyway.

    Try this:

    Code:
    INSERT INTO [TABLE B]
    SELECT *
    FROM [TABLE A] 
    WHERE [TABLE A].[Full Name]="FULL NAME";
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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