Results 1 to 8 of 8
  1. #1
    nwatterson is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Jan 2015
    Posts
    12

    Getting duplicate records in split form datasheet when using combo box with multiple selections

    I hope someone can give me guidance as to how to correct the issue below. I created a split form and I have 2 combo boxes that allow multiple selections. The one combo box for LOB (line of business) works perfect and does not create duplicate records in the datasheet view of the split form. The 2nd combo box with multiple selections creates duplicate records in the datasheet depending on how many selections are made. I have checked this in the underlying table and there are no duplicate records, it is only in the split form datasheet. I have checked settings and configuration between the 2 combo boxes that are reacting differently and they appear to be identical and therefore have absolutely no idea why I am having this problem.



    Any guidance would be greatly appreciated.

    Thanks, Neil

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,920
    Need to review data structure, form design, and code. If you want to provide db for analysis, follow instructions at bottom of my post.
    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
    nwatterson is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Jan 2015
    Posts
    12
    Thanks June, I know you will have a lot of recommendations as I am not even a good novice but besides this one issue I have the database does work. If you open FRM All projects, you will see in the datasheet rows 4,5 and 6 are duplicate project #'s. You will see 3 check boxes selected in the field CBT Applications. This appears to be what is causing the duplication only in the split form datasheet. the Tbl projects only has a single record as expected. Also note, the field LOB is setup the same way but multiple selections does not creat duplicate split form datasheet records.

    Thanks again for your guidance, I am completely stumped and I know it will end up being something stupid on my part.

    Neil

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,920
    The multiple records are because of the multi-value fields included in the All Projects query. I NEVER use multi-value fields.

    The form RecordSource is a query with only one table - Tbl Projects. There is no filter or sort criteria in the query - could just reference the table. Or use an SQL statement as done in the other forms. But again, they all pull from only one table and none have filtering so could just reference tables.

    So I changed the RecordSource to Tbl Projects and the duplication goes away. This SQL also works: SELECT * FROM [Tbl Projects] ORDER BY [Project #];


    Advise no spaces and special characters/punctuation (underscore is exception) in naming convention. Better would be tblProjects or tbl_Projects and ProjectNum or Project_Num.
    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.

  5. #5
    nwatterson is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Jan 2015
    Posts
    12
    Thanks June, I'll take a look and mark as closed once complete.

  6. #6
    nwatterson is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Jan 2015
    Posts
    12
    June, what field did you change the record source to Tbl projects?

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,920
    I didn't change field, I only changed the form RecordSource property.
    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.

  8. #8
    nwatterson is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Jan 2015
    Posts
    12
    Awesome, thanks June. I knew it would be something real simple.

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

Similar Threads

  1. Multiple Selections in a Combo Box
    By BeStout in forum Access
    Replies: 6
    Last Post: 07-09-2014, 12:44 PM
  2. Replies: 21
    Last Post: 06-13-2013, 06:51 AM
  3. Replies: 9
    Last Post: 12-19-2011, 06:30 PM
  4. Replies: 1
    Last Post: 12-18-2011, 01:52 AM
  5. Replies: 1
    Last Post: 03-02-2009, 11:54 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