Results 1 to 9 of 9
  1. #1
    lynthel is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2013
    Posts
    30

    Append Query - Multi-Valued Fields

    Is there an easy way to find which fields in a query are causing the error "An INSERT INTO query cannot contain a multi-valued field"?

    I am importing from an Excel spreadsheet into a separate table. The query is taking records from the separate and appending the main table. Some of the fields in the main table have input masks and value lists. This will hopefully turn into a macro in the future to simplify things for the end users.
    Last edited by lynthel; 05-02-2014 at 10:12 AM. Reason: Typo

  2. #2
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Using an insert, you need to state which value(s) are to be used and in order. If you debug your code, what line does it error out on? Make sure you specify .Value and this should correct the issue.

  3. #3
    lynthel is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2013
    Posts
    30
    Quote Originally Posted by burrina View Post
    Using an insert, you need to state which value(s) are to be used and in order. If you debug your code, what line does it error out on? Make sure you specify .Value and this should correct the issue.
    In simple language, I am attempting to pass data into a field that does not match the input mask or does not match a choice (or choices) that is within the lookup row source, correct? I do not know how to debug a query other than to copy and paste the SQL query on here for someone nice like you to point out my error...instead, I am working my darndest to learn to find the error on my own.

  4. #4
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    In order to assist you further We would need to see the code and or screenshots of what you are doing.

  5. #5
    lynthel is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2013
    Posts
    30
    Code:
    INSERT INTO tbl_travelers_info ( firstname, lastname, address_personal, city_personal, state_personal, zip_personal, home_no, cell_no, email_personal, email_school, vccid, Campus, Gender, DOB, Race, passport_country, citizenship_country, [passport#], passport_exp_date, discipl_issues, CourseList, intern_program, intern_credits, emergency_name, emergency_relationship, emergency_phone, emergency_email, diet_restrictions )
    SELECT tiw_travelers_import.Personal_FirstName, tiw_travelers_import.Personal_LastName, tiw_travelers_import.Address, tiw_travelers_import.City, tiw_travelers_import.State, tiw_travelers_import.ZipCode, tiw_travelers_import.Personal_HomePhone_1, tiw_travelers_import.Personal_CellPhone_1, tiw_travelers_import.Personal_Email1_1, tiw_travelers_import.Personal_Email2_1, tiw_travelers_import.Personal_VID_1, tiw_travelers_import.Personal_Campus_1, tiw_travelers_import.Personal_Gender_1, tiw_travelers_import.Personal_DOB_1, tiw_travelers_import.Personal_Race_1, tiw_travelers_import.Personal_Passport_Answer2, tiw_travelers_import.Personal_Passport_Citizenship, tiw_travelers_import.Personal_Passport_Answer3, tiw_travelers_import.Personal_Passport_Expiration_1_1, tiw_travelers_import.Personal_A4, tiw_travelers_import.CourseList, tiw_travelers_import.InternProg, tiw_travelers_import.InternCred, tiw_travelers_import.emergency_name, tiw_travelers_import.emergency_relationship, tiw_travelers_import.emergency_phone, tiw_travelers_import.emergency_email, tiw_travelers_import.DietaryRestrictions
    FROM tiw_travelers_import;
    Attached Thumbnails Attached Thumbnails Capture1.PNG   Capture2.PNG  

  6. #6
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    You need to define the Multi-Value by using .Value so it know what the value is.
    http://office.microsoft.com/en-us/ac...010149297.aspx
    Last edited by burrina; 05-02-2014 at 11:08 AM. Reason: Link Provided

  7. #7
    lynthel is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2013
    Posts
    30
    Thank you for the link...I have isolated down to one field...race! since race can be multiple values, it will not let me import either the main race field or the race.value...how do I get a query to append the race record to what ever is being imported?

  8. #8
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    race.Value

  9. #9
    raychow22 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    May 2017
    Posts
    145
    What there ever a solution to this?

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

Similar Threads

  1. join two tables on multi-valued field
    By smudger in forum Queries
    Replies: 3
    Last Post: 06-17-2012, 03:12 AM
  2. Replies: 5
    Last Post: 12-18-2011, 09:12 PM
  3. Multi Valued field sort
    By bugman61 in forum Reports
    Replies: 2
    Last Post: 08-06-2011, 11:45 AM
  4. querying Multi-valued fields
    By switters in forum Queries
    Replies: 1
    Last Post: 04-21-2011, 10:59 AM
  5. Append Query - Multi-Valued Field
    By catat in forum Queries
    Replies: 0
    Last Post: 05-11-2010, 01:52 PM

Tags for this Thread

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