Results 1 to 6 of 6
  1. #1
    jerepois is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Jul 2014
    Posts
    16

    Combo Box selection is updating more than one record at a time.

    I was not sure where to post this but since I am dealing with forms and their controls I figured why not post in the forms section.

    Now to get to the point. I have several combo boxes on a form. We will only look at one because if we can solve one I can apply the solution to the rest.



    combo box name: SCOPE_CATEGORY (Picture#4)
    control source: ScopeCategoryName (Picture#4)
    record source: SELECT tblScopeCategory.ScopeCategoryName, tblScopeCategory.ScopeCategoryID FROM tblScopeCategory ORDER BY tblScopeCategory.ScopeCategoryName; (Picture#4)

    When I open in Form View and select a record (Picture#1), I see that my combo box is pulling the right record information.
    Lets say I want to change the Scope from Sustaining Capital to Major Projects. I go to my Combo box and select Major Projects (Picture#2).
    After the update the record changes.(Picture#3) But you now can also see that 3 records down the ScopeCategoryName has also change to Major Projects (Picture # 3).

    It seems that when I make a selection the choice is applied to more than one record even though they all have different PKs.

    I have attached several pictures that should provide enough information to help me start debugging.
    Attachment 17369
    Attachment 17368
    Attachment 17367
    Attachment 17372
    Attachment 17371
    Attached Thumbnails Attached Thumbnails Untitled.png   Untitled2.png   Untitled3.png   Untitled4.png   Untitled5.png  


  2. #2
    jerepois is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Jul 2014
    Posts
    16
    Here is a picture of the forms Query In design mode.
    Click image for larger version. 

Name:	Untitled6.png 
Views:	8 
Size:	91.2 KB 
ID:	17378

  3. #3
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Sounds like a referential integrity rule that was set via options from the Relationships Window.

  4. #4
    jerepois is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Jul 2014
    Posts
    16
    tblWorkPackage and tblWorkList are a 1 to 1 relationship and everything else is a 1 to many relationship. Everything is enforced in the back end file.

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,641
    I suspect you have the combobox bound to the wrong field. Looks like it is bound to ScopeCategoryName field from tblScopeCategory instead of ScopeCategoryID field from tblWorkList.

    Which means you are changing the value in tblScopeCategory record. Do you now see multiple records in that table with the same category name?

    Change the combobox properties:
    RowSource: SELECT ScopeCategoryID, ScopeCategoryName FROM tblScopCategory ORDER BY ScopeCategoryName;
    ControlSource: ScopeCategoryID (from tblWorkList)
    BoundColumn: 1
    ColumnCount: 2
    ColumnWidths: 0";2"
    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.

  6. #6
    jerepois is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Jul 2014
    Posts
    16
    June7, You truly are an expert. I am not sure what I was thinking when I was creating my forms record source. I completely understand where I went wrong. I can't believe I spent 2 hours trying to figure this out and over looked that I was assigning the wrong sourceID.

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

Similar Threads

  1. Replies: 1
    Last Post: 06-17-2013, 11:44 AM
  2. Replies: 2
    Last Post: 03-08-2013, 02:07 PM
  3. Replies: 2
    Last Post: 03-01-2012, 03:11 PM
  4. Record Selection, email and then table updating
    By ballj_35 in forum Programming
    Replies: 4
    Last Post: 10-05-2010, 01:41 PM
  5. Pop-up Combo Box Record Selection
    By AKQTS in forum Forms
    Replies: 1
    Last Post: 08-11-2010, 01:01 PM

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