Results 1 to 8 of 8
  1. #1
    wubbit is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    24

    Problem with Listbox update via Combobox and Field Values

    I have a listbox(includesA) which works via combobox(sel_mac) update sort and the field values that were selected prior, however, the values it posts are numeric ID values and not the actual field values I want to be shown in the listbox.
    Any ideas on how to fix this problem? I have some code below that pushes the updates from the combo to the list.

    Private Sub sel_mac_Change()
    Dim strSQL As String
    strSQL = "SELECT Includes.macro_number, Includes.macro_part1, Includes.ID, Includes.catagory FROM Includes WHERE (((Includes.catagory)=" & Forms!Proposals!sel_mac & "))"


    Me!includesA.RowSourceType = "Table/Query"
    Me!includesA.RowSource = strSQL
    Me!includesA.Requery

    End Sub

    I have included a snapshot of the problem area.


    Click image for larger version. 

Name:	Test.jpg 
Views:	12 
Size:	185.8 KB 
ID:	7219

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Why do half of the lines show the descriptive info instead of ID numbers? Do you want to provide the project 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
    wubbit is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    24
    The lines that show the info are the populated ones from the combobox, the others I think are pulled from the macro_combobox that is in the table. It is a lookup field that holds the values of includes.id - at least that is what I can see... not sure what is wrong there. I will add the database though. thanks.

  4. #4
    wubbit is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    24

    Database

    Here is the database.
    Attached Files Attached Files

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    The tables are web-based (Sharepoint?) and I can't open in Design view. Makes it hard for me to analyse structure. Can't even open the Relationships builder.

    I tested the listbox rowsource SQL in an independent query and find it does not show the additional rows with the IDs and checked boxes. So I am baffled about where those rows are coming from. The query doesn't show the checkboxes so somehow this issue is tied to the checkboxes in the listbox.

    I do find it odd that the rows in listbox with checks are the problem items. How are those checkboxes made to show in the listbox? I have never seen this before. But then I have never worked with a web database.
    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
    wubbit is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    24
    The listbox is bound to the macros field, which hold the includes.id (which is the listbox data key). I was under the impression that using the macros field as a bound item would cause the list to populate the checked boxes for those items selected previously. I am not sure what happen with it, but this is a key error that is causing some issue.
    I can try to figure out why you are not able to open the design view, I have not packaged it in anyway and it allows my machines to edit the database.

    Let me see if someone has locked the database, I am working with a few people on this for testing purposes.

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    The macros field is a multi-value. I refuse to use multi-value fields because of the issues they cause.
    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
    wubbit is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    24
    It was the only way I could get the multiple selections to work with little issues. I can pursued the client to accept the redundant listings I believe.

    Thanks for the assistance.

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

Similar Threads

  1. Replies: 7
    Last Post: 11-24-2014, 02:11 PM
  2. Replies: 2
    Last Post: 04-10-2012, 12:30 AM
  3. Combobox to show two field values
    By lnordstrom in forum Forms
    Replies: 2
    Last Post: 03-30-2011, 12:33 PM
  4. Replies: 1
    Last Post: 03-24-2010, 08:42 AM
  5. Replies: 0
    Last Post: 04-17-2008, 09:24 AM

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