Ken Sheridan
Active member
- Local time
- Today, 10:58
- Joined
- Jul 10, 2025
- Messages
- 425
I followed the example in your database (thanks) and although it works, I cannot delete a category once added (on the subform - I know i can go to the table and do it) .
Also I would like it to show all categories that a member holds, in some cases 3 [possibly 4] . I've created a list box also which highlights each category in turn [for a multi-category member]
To delete a category in the subform you need to delete the row, not just the value in the combo box. Click on the record selector to the left of the row, and press the Del key. You should then be prompted to confirm the deletion. This will delete the member's association with the category. It does not delete the category from the tblCategoryTypes table.
I don't quite follow what you are saying in the second paragraph above. Provided that the subform is in continuous forms view (like the courses subform in my demo) you'll see all the categories for the current member as multiple rows in the subform. Forget about a list box. I know my demo includes an example in which a student's courses are shown as selections in an unbound multi-select list box, but I've only included that because I've occasionally had requests from people who want to show related items in this way. As I say in the demo, I'd nevertheless recommend a conventional form/subform interface. Unlike a list box this is code-free, though you might want to include code in the combo box's NotInList event procedure to add a new category not yet represented in the list. My demo includes this functionality.