Results 1 to 14 of 14
  1. #1
    Aztecfan63 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2020
    Location
    Chula Vista, CA
    Posts
    26

    "Query must have at least one destination field."


    I am trying an Append Query for the 1st time. I followed the detailed instructions from MS and I get "Query must have at least one destination field." Any ideas?

  2. #2
    Gustav's Avatar
    Gustav is offline Advanced Beginner
    Windows 11 Office 365
    Join Date
    Jan 2025
    Posts
    32
    You have selected the fields/expressions that will be read, but not assigned any fields these data shall be written to.

  3. #3
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,550
    Why not show the query sql?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  4. #4
    Aztecfan63 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2020
    Location
    Chula Vista, CA
    Posts
    26
    I don't understand your answer. what do you mean "show the query sql"
    If sql refers to Structured Query Language, I don't know how to show it. Can I do that while in MS Access?

  5. #5
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,927
    what do you mean "show the query sql"
    from the query builder you can right click and select ‘view sql’. Or bottom right there is an option to select sql. And in the ribbon in the left you can select SQL view. Worst case, show a screen shot of your query builder window

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 11 Access 2021
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Switch the query builder to SQLView then copy/paste the text that it displays.

    And in Access versions later than 2010, I think can right click over query in Navigation pane and select SQLView. Unfortunately, can't use my 2021 version now to confirm.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    Aztecfan63 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2020
    Location
    Chula Vista, CA
    Posts
    26
    Click image for larger version. 

Name:	append.jpg 
Views:	18 
Size:	163.8 KB 
ID:	53128

    These are the instructions I used.

  8. #8
    Aztecfan63 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2020
    Location
    Chula Vista, CA
    Posts
    26
    SELECT
    FROM [Debit Card Master Table] INNER JOIN [Card Table] ON ([Debit Card Master Table].[Bank Phone] = [Card Table].[Bank Phone Number]) AND ([Debit Card Master Table].[security code] = [Card Table].[Security Code]) AND ([Debit Card Master Table].[Persons name on debit card] = [Card Table].[Name on Card]) AND ([Debit Card Master Table].[Expire Date] = [Card Table].[Expire Date]) AND ([Debit Card Master Table].Status = [Card Table].Status) AND ([Debit Card Master Table].[Card Number] = [Card Table].[Card Number]) AND ([Debit Card Master Table].[Name of Bk or Cu] = [Card Table].[Bank or CU name]);

    does this make sense to you?

  9. #9
    Aztecfan63 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2020
    Location
    Chula Vista, CA
    Posts
    26
    What else can I do?

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows 11 Access 2021
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    That's just joining two tables on multiple field pairs. It does not add records. An APPEND query would start with INSERT INTO.

    Why are you wanting to use an APPEND anyway?

    Might review https://www.accessforums.net/showthread.php?t=90984

    Could provide db for analysis. Follow instructions at bottom of my post.
    Last edited by June7; 06-26-2025 at 08:02 PM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #11
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,927
    That is a basic sql statement- as suggested in post #2 you have not specified a destination table or the fields. Your sql should look something like

    INSERT INTO tableName (fld1, fld2….)
    followed by your select statement

    as an aside, don’t have spaces in table and field names

  12. #12
    Vstar920AZ♣ is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2023
    Location
    Phoenix, AZ
    Posts
    11
    The query you are showing is a Select query (i.e. just for viewing)
    To Make a table you need an Into statement also

    SELECT Booked1_Q.Sales_Order INTO TestTable1_t

    FROM Booked1_Q;

    To Append you need an Insert Into statement. The insert into fields need to match the select fields. This is only a one field insert.
    INSERTINTO TestTable1_t ( Sales_Order )
    SELECT Booked1_Q.Sales_Order
    FROM Booked1_Q;

    Or you can choose the Make Table option or the Append option in the Query Design window.

    Click image for larger version. 

Name:	Make_Append.jpg 
Views:	16 
Size:	33.6 KB 
ID:	53129

  13. #13
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,927
    These are the instructions I used.
    You have only done the first 4 items, you have not selected a destination table or mapped the fields

  14. #14
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,550
    If instructions are not enough, have a look at some videos.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 03-22-2018, 01:49 PM
  2. Replies: 1
    Last Post: 03-13-2015, 06:24 AM
  3. Replies: 3
    Last Post: 04-06-2012, 09:14 AM
  4. Replies: 10
    Last Post: 02-02-2011, 05:48 PM
  5. Replies: 0
    Last Post: 12-21-2009, 12:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums