Results 1 to 3 of 3
  1. #1
    Fred B. is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2011
    Posts
    2

    Import xls with multi-value fields

    Hi,
    I need to import data from an Excel spreadsheet that has a column with cells that have multiple values. The Excel spreadsheet was generated by Google Forms. The column with multiple values was populated by a question asking "What requirements does this class fulfill?" and the response is a series of check boxes. The user can check more than one box.

    The entries in the Excel spreadsheet look like this:
    Answer1, Answer2, Answer3 - If the user checked boxes for Answer1, Answer2, and Answer3


    Answer2, Answer3 - If the user checked boxes for Answer2 and Answer3
    etc

    The corresponding fields in Access are currently setup as:
    Data Type - Text
    Display Control - Combo Box
    Row Source Type - Value List
    Row Source Type - "Answer1"; "Answer2"; "Answer3"
    Allow Multiple Values - Yes
    Limit to List - Yes

    If I try to Import External Data (append), I get the error message:
    "The contents of 1 records were deleted, and 0 records were lost due to key violations.
    *If data was deleted, the data you pasted or imported doesn't match the field data types or the FieldSize property in the destination table.
    *If records were lost, either the records you pasted contain primary key values that already exist in the destination table, or they violate referential integrity rules for a relationship defined between tables

    If I import the Excel spreadsheet into a new table, and then change the Lookup for the column in question, I end up with combo box fields like this:
    [] Answer1
    [] Answer2
    [] Answer3
    [] Answer1, Answer2, Answer3
    [] Answer2, Answer3

    So it looks like the multi-value fields from Excel are just creating new possible values in the combo box instead of checking multiple boxes like it should, even if I have "Limit to List" set to "Yes" in the Lookup for that field.

    I hope this all makes sense. Any help would be greatly appreciated. I am obviously a total newb at this, but I have not found the Access help files very helpful. Thank you!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    Multi-value fields are inherently problematic. If you can, suggest breaking out the values to separate fields or to records in a child table.

    Combobox can't be multi-select. That is a property of Listbox.
    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.

  3. #3
    Fred B. is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2011
    Posts
    2
    Thanks for the reply June7. I will work on another solution then.

    One thing: I am able to set up ComboBox in Access to allow multi-select. I haven't been able to import data so that it works with multi-select, but it is an option (Allow Multiple Values - Yes). I tried what I have been attempting with Listbox as well and couldn't get it to work. As you say, multi-value fields are problematic.

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

Similar Threads

  1. querying Multi-valued fields
    By switters in forum Queries
    Replies: 1
    Last Post: 04-21-2011, 10:59 AM
  2. import excel into form with combobox fields
    By MyWebdots in forum Import/Export Data
    Replies: 2
    Last Post: 08-09-2010, 02:35 AM
  3. Multi Prgarm Need to use the same DB
    By the_others in forum Access
    Replies: 2
    Last Post: 07-04-2010, 12:44 AM
  4. multi prgrams need to use same DB
    By the_others in forum Queries
    Replies: 0
    Last Post: 07-02-2010, 03:25 AM
  5. Import or link fields via ODBC
    By smoked1 in forum Import/Export Data
    Replies: 9
    Last Post: 10-30-2009, 03:55 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