Results 1 to 8 of 8
  1. #1
    Maxjoo is offline Novice
    Windows 11 Office 365
    Join Date
    Jul 2024
    Location
    Carmel, Indiana, USA
    Posts
    18

    how to add records to a current table using an append query?


    Hello, every-1!!!!!...

    I want to add the records from a second table to the main table using an append query, but every time I run the query a error appears, "an INSERT INTO query can not contain a multi-valued field". How can I solve this issue?. Thank You in advance!!!!

  2. #2
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,821
    Hi
    It is recommended not to use Multi-Valued fields.

  3. #3
    Maxjoo is offline Novice
    Windows 11 Office 365
    Join Date
    Jul 2024
    Location
    Carmel, Indiana, USA
    Posts
    18
    I eliminated the Multi-Valued fields, but the error keeps showing up...

  4. #4
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,821
    Can you upload the SQL for the append?

  5. #5
    Maxjoo is offline Novice
    Windows 11 Office 365
    Join Date
    Jul 2024
    Location
    Carmel, Indiana, USA
    Posts
    18
    INSERT INTO tblMaintenanceDetails_Backup ( [BUILDING NAME], [UNIT NUMBER], [DESIGN (BED/BATH)], [ORDER DATE], [WORK ORDERED], CLEANING, [DATE FINISHED], [ENVOICE NUMBER], [ADITIONAL SERVICE] )
    SELECT [301 N CHARLES].[BUILDING NAME], [301 N CHARLES].[UNIT NUMBER], [301 N CHARLES].[DESIGN (BED/BATH)], [301 N CHARLES].[DATE ORDERED], [301 N CHARLES].[WORK ORDER], [301 N CHARLES].CLEANING, [301 N CHARLES].[DATE FINISHED], [301 N CHARLES].[ENVOICE NUMBER], [301 N CHARLES].[ADITIONAL SERVICE]
    FROM [301 N CHARLES];

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Max,
    How about giving readers the 30,000 ft overview of your application? The who, what, where, when, how much and how often to provide some context...... may help with communications.

  7. #7
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    Quote Originally Posted by Maxjoo View Post
    I eliminated the Multi-Valued fields, but the error keeps showing up...
    Well there must be one in there somewhere?
    I am thinking that your db is not normalised going by the name of the source table?
    Do you have a table for each building?
    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

  8. #8
    madpiet is offline Expert
    Windows 10 Office 365
    Join Date
    Feb 2023
    Posts
    565
    Quote Originally Posted by Maxjoo View Post
    INSERT INTO tblMaintenanceDetails_Backup ( [BUILDING NAME], [UNIT NUMBER], [DESIGN (BED/BATH)], [ORDER DATE], [WORK ORDERED], CLEANING, [DATE FINISHED], [ENVOICE NUMBER], [ADITIONAL SERVICE] )
    SELECT [301 N CHARLES].[BUILDING NAME], [301 N CHARLES].[UNIT NUMBER], [301 N CHARLES].[DESIGN (BED/BATH)], [301 N CHARLES].[DATE ORDERED], [301 N CHARLES].[WORK ORDER], [301 N CHARLES].CLEANING, [301 N CHARLES].[DATE FINISHED], [301 N CHARLES].[ENVOICE NUMBER], [301 N CHARLES].[ADITIONAL SERVICE]
    FROM [301 N CHARLES];
    Are the values from your SELECT statement from columns in your table or are they literal values? if they're literal values, then they should be either in single quotes 'like this' (for strings) and no delimiter for numbers. It's not completely clear which you're intending.

    Also, if you don't have a WHERE clause on your [301 N Charles] table, all of the records in that table will be appended to the tblMaintenanceDetails_backup table. Is that what you mean to do?
    Last edited by madpiet; 10-24-2024 at 02:52 PM.

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

Similar Threads

  1. Replies: 6
    Last Post: 02-03-2022, 11:05 AM
  2. Replies: 12
    Last Post: 12-18-2017, 05:33 PM
  3. Replies: 19
    Last Post: 10-03-2017, 09:10 AM
  4. Access can't append all the records in the append query
    By fluffyvampirekitten in forum Access
    Replies: 2
    Last Post: 08-27-2015, 01:53 AM
  5. Replies: 1
    Last Post: 11-16-2014, 09:10 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