subforms

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MEGDZIA
    New Member
    • Apr 2008
    • 27

    subforms

    Hi,
    I am wondreing if you can help me.
    I created a form which will generate a product code by choosing different options from 8 combo boxes and by doing that filtering all these options from subform below.
    The Main form name is : Part Number,
    It contains 8combo boxes with dropdown lists each. (by choosing one option from each list it creates a product code)i.e. BB H1 B 53 A B C A
    I have created the subform which includes of all the options from the dropdown lists.
    Is there a possibility to create a code that will filtewr all the lines from subform by choosing only one option from each dropdown list???

    Any ideas ??

    Many thanks.
    megdzia
  • garyb2008
    New Member
    • Nov 2008
    • 18

    #2
    Hi

    Im sorry i follow you up to the point were you describe the subform, "it includes all of the options"???

    Do you mean the subform has eight combos as well with the same drop down options as the main form?

    Regards

    Gary

    Comment

    • MEGDZIA
      New Member
      • Apr 2008
      • 27

      #3
      Hi Gary,
      Thanks for asking.
      Lets say that each combo has 6options and there are 8combos so the subform includes 48 lines with all options from each combo box above.(no combos in subform).
      what I would like to achieve is by chosing one option from each combo box to eliminate the remaining 5 in the subform and leave just the one which was picked up from the combo box above.Hope that helps...
      Can you think of any VBA code that is applicable???
      Any help will be greatly appreciated.
      many thanks,
      megdzia

      Comment

      • Stewart Ross
        Recognized Expert Moderator Specialist
        • Feb 2008
        • 2545

        #4
        Hi. The general principles of using multiple combo boxes which are cascade-filtered are given in our howto article on cascading combo boxes.

        However, you may struggle to produce source queries which can be suitably filtered, given the apparently manual way you currently seem to build your part number string.

        If I was doing this I would think long and hard about how the part number is intended to match the product. To get a better view of how this is done I would write down a decision table - just on paper - to clarify what the patterns involved are. If the rules for producing the part number can be codified then they can be automated using Access. If the rules are difficult to write down manually then it will be difficult if not impossible to get Access to do the job for you, as cascaded combos have to have a defined source that is filtered from one cascaded combo to the next - no good if you can't define how the filtering is to work.

        After defining the rules for the part number I would tend towards using a custom function written in VBA which takes the necessary data from whatever defines the product and generates a part number for the product automatically - perhaps in conjunction with a table of unique numbers if needed. In any event, if I was you I would define the rules and be absolutely clear about what it is you want to be implemented before going any further.

        -Stewart

        Comment

        Working...