Which is best? Multi-Value ComboBox or Check Boxes?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Simmo160
    New Member
    • Oct 2013
    • 7

    Which is best? Multi-Value ComboBox or Check Boxes?

    I'm doing a drawing register for generator control systems and have a Multi-value combo-box for the extras.

    The first register I did had check boxes, but I didn't foresee the amount of extras that would come my way, so I went down the MVF Combo route which allowed me to enter as many extras as possible without the form looking like Swiss Cheese!

    However, if I want to create a type of bill of materials, I can't find out how to extract one piece of text from the many possibilities of extras. For instance, If the extras include "Battery Charger, Coolant Heater, Fire Valve" - which is how it is shown in a text box in my table - how can I extract the Battery Charger option so that it shows "Battery Charger 12 Volts 5 Amps" on a separate form? If it was a check box, it would be easy.

    The drawing can be used for several different types of battery charger output, which stops me putting voltage and current output on the extras list, and I can code those into the materials based on engine type and size anyway.

    And no, I didn't use autonumber as the primary key for the extras, just used the name.
    [imgnothumb]http://bytes.com/attachments/attachment/7283d1383302392/mvf.jpg[/imgnothumb]
    Attached Files
    Last edited by NeoPa; Nov 1 '13, 04:04 PM. Reason: Changed to show pic in post.
  • Seth Schrock
    Recognized Expert Specialist
    • Dec 2010
    • 2965

    #2
    I'll admit that I'm not sure that I totally understand the question, but my recommendation would be to have all your extras in a related table (displayed in a subform). You can then either use combo boxes to select the extras (each extra selected would then be in its own record) or you can have the related table have your checkbox field showing all of the extras and you then just select the proper ones. Either way, each extra would have its own record in the related table. This makes it easy to select a specific extra as you aren't having to pull it out of a whole group of extras.

    Comment

    • ADezii
      Recognized Expert Expert
      • Apr 2006
      • 8834

      #3
      It is not exactly intuitive how to extract Values from a Multi-Value Field. Let's assume you have a Table named tblContacts with a PK of [ContactID] and a Multi-Value Field named [ContactType]. Executing the following Code will list all IDs for the first 10 Records along with the Multiple Values for Contact Type, should that be the case.
      Code:
      'An example of listing all the Complex Values in the Contacts table
      Dim db As DAO.Database
      Dim rst As DAO.Recordset
      Dim rstComplex As DAO.Recordset2
      
      Set db = CurrentDb
      Set rst = db.OpenRecordset("SELECT * FROM tblContacts")
          
      Do Until rst.EOF
        'Get the Contact Type complex field
        Set rstComplex = rst!ContactType.Value
              
        Do Until rstComplex.EOF
          'Dump out each value
           Debug.Print "Contact ID: " & rst!ContactID & " | " & "Contact Type: " & rstComplex!Value
             rstComplex.MoveNext
        Loop
          rst.MoveNext
      Loop
      OUTPUT for Contact IDs 1 to 10:
      Code:
      Contact ID: 1 | Contact Type: Customer
      Contact ID: 1 | Contact Type: Sales prospect
      Contact ID: 2 | Contact Type: Customer
      Contact ID: 3 | Contact Type: Customer
      Contact ID: 3 | Contact Type: Distributor
      Contact ID: 3 | Contact Type: Sales prospect
      Contact ID: 3 | Contact Type: Trainer
      Contact ID: 4 | Contact Type: Customer
      Contact ID: 4 | Contact Type: Sales prospect
      Contact ID: 4 | Contact Type: Trainer
      Contact ID: 5 | Contact Type: Customer
      Contact ID: 6 | Contact Type: Customer
      Contact ID: 6 | Contact Type: Other
      Contact ID: 6 | Contact Type: Sales prospect
      Contact ID: 6 | Contact Type: Trainer
      Contact ID: 7 | Contact Type: Customer
      Contact ID: 7 | Contact Type: Distributor
      Contact ID: 7 | Contact Type: Sales prospect
      Contact ID: 8 | Contact Type: Customer
      Contact ID: 9 | Contact Type: Customer
      Contact ID: 9 | Contact Type: Trainer
      Contact ID: 10 | Contact Type: Customer

      Comment

      • Simmo160
        New Member
        • Oct 2013
        • 7

        #4
        Thanks for the above. I'm beginning to think I'm in out of my depth!

        My problem is that if I want to add extras to a wiring diagram register in a quick and easy manner, it's easier to do it using check boxes. However, if somebody wants a drawing doing where the extra is not included on the form, then I'd have to add it and code in design mode. By using a calculated text box, I can add it to a table and refresh the form putting that addition into the combo box. By sending the selected additions to a text box, I can then get a write-up of what the drawing includes. Also, I can type in the extra item in the search box and it will scroll through all the drawings that include that item.

        What I'd like to do is to use the drawing number as a model number for an item, and add the current rating to differentiate with sizes, as that is the determining factor (the drawing could be used for 30 or so different sizes). GS10-001-40, GS10-001-100, GS10-001-250 etc.

        I'd like to extract the extras from the Drawing Additions filed so that it automatically itemises them in a BOM.

        I'm not averse to trying different options, and I'll have a crack at the couple above. I just don't understand it at the moment. I've cracked a lot of other stuff (many-to-many, hiding forms depending upon whoever logs in, etc) but this one has me well and truly stumped!

        Comment

        Working...