Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2010
    Posts
    18

    Question Multiple instances of a continuous subform instead of a Multi-Select Listbox?

    Hi All,
    How can multiple instances of one continuous subform (10 copies; no tab control) be made to behave like one multi-select listbox, populating a join table? I'd like to use something like Albert Kallal’s MultiSelect.mdb from http://www.kallal.ca/msaccess/msaccess.html, but am unsure how to use it as an unbound, list-box-style subform.

    Desired functionality:
    I’d like for the frmMAIN to simply show the client’s name. The 10 subforms would group all classes by their category, and show the different classes available for the client to select. The user would click various checkboxes next to the classes' names in the subforms, and then click a submit button. This would then create all the records in the join table.

    Any help in developing this would be very much appreciated.
    Thanks!

    Other info:
    Tables:

    tblClients, tblClasses, tblClassCategories, tblClassSubcategories, jtblClientsAndClasses

    Form Setup:


    Currently, the parent form is named frmMAIN and the 10 instances of the same subform are: sfrmClasses1, sfrmClasses2, …, sfrmClasses10. To filter, I’ve put 10 hidden textboxes on the parent form that correspond with each subform: txtClasses1, txtClasses2, …, txtClasses10. The control source of each textbox equals its number: =1, =2, …, =10. For example, the first subform’s link master fields = ClassID,txtClasses1, and link child fields = ClassID,ClassCategoryID, where the ClassCategoryID corresponds with the txtClasses1 control source. However, this is currently only showing what classes have been checked--not the entire lists of classes.

    The record source for the subform is: SELECT Classes.ClassID, Classes.Class, Classes.ClassCategoryID, ClassCategories.ClassCategory, Classes.ClassesSubcategoryID, ClassesSubcategories.ClassesSubcategory FROM ClassesSubcategories INNER JOIN (ClassCategories INNER JOIN Classes ON ClassCategories.ClassCategoryID = Classes.ClassCategoryID) ON ClassesSubcategories.ClassesSubcategoryID = Classes.ClassesSubcategoryID;

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,725
    It seems that what you are trying to achieve is:

    Selecting an entry from a client list, make selections for
    Class, Category, SubCategory and then to save a record
    which identifies the Class(es)etc for this client.

    Have you considered cascading combo boxes?
    Why do 10 subforms have to exist? Just curious, you know the data and we don't.

  3. #3
    Join Date
    Sep 2010
    Posts
    18
    Yes, a listbox would be easier--but can't use list or comboboxes. The reason for this is that we need to be able to have full control of modifying text type and line spacing inside the lists for other form formatting purposes.

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,725
    My suggestion would be to do the other formatting issues as a separate task. Agreed, that may not be an option ultimately, but I would not constrain an approach to form design (user interface) based on some other formatting issues. In the extreme, it sounds as if you could be changing field(column names) in order to accommodate some "size/formatting" issue.
    Just my $.02

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: 1
    Last Post: 03-15-2011, 03:53 PM
  3. Replies: 1
    Last Post: 03-01-2009, 09:53 AM
  4. Replies: 1
    Last Post: 02-25-2009, 07:29 PM
  5. Multi-select listbox and update flag in table
    By Suresh in forum Programming
    Replies: 0
    Last Post: 12-19-2007, 01:04 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