OK, so I know that this is not possible. Per Microsoft's documentation: "Use the DCount function to count the number of records in a domain when you don't need to know their particular values."
But what if I do want to know what the value of those records are?
Background:
Existing DB with a junction table (JT) to handle a M:M relationship between Users & Items. Originally had a form with checkboxes for each Item and got help on this forum in this thread to enable the user's items on the form via DCount. The client then decided that they preferred a Listbox of the items instead of the checkboxes. I tweaked the code for a listbox and all was well in the universe until I added a new item to the Item table. The form's listbox is sorted by item name when the form loads. Now of course, the For loop incorrectly enables the listitems since the listbox items are sorted by name instead of Item_ID. If I change the rowsource to sort the listbox by ItemID, it works but the list is not alphabetized which looks bad.
Since I cannot get the value of the Item using DCount, what could I use to iterate the JT, obtain the Item's value, and select the listbox items associated with said user based on that value instead of the loop iteration?
Thanks in advance guys,
-Bill
ps: I cannot post the DB, as it contains existing employee information. Although my status is "novice", I am comfortable with VBA code and some query design.