Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jun 2003
    Location
    Indiana, USA
    Posts
    141
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Form A has a drop-down box, values 1, 2, 3, etc. The data selected on Form A autofills Form B. On Form B is another dropdown box that contains data related to the drop-down box on Form A, in that all of the related drop-down values related to the previous, 1, 2, 3, are also shown. Currently I have a three column drop-down on Form B that shows the related 1, 2, 3, etc. values, as there is some fields with the same name related to value 1, value 2, and so forth. Example. Red - 1, Red - 2, Red - 3.

    I would like to filter or populate the combo drop-down box on Form B, based on the value autofilled from Form A. So if the value selected on Form A is 1, it will autofill a field on Form B with "1". And...ideally, based on that value, the combo box would only show values that are also related to "1".

    I know how to use two combo boxes on the same form, and populate/filter one, based on the values of the other. But this is two different forms, with one combo on one form, and the other on Form B, plus I want to filter off of a Text Box value. Should I be firing my combo box off of the value stored in the underlying table??? Not sure where to go with this one.

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    Linking combo boxes between two forms is no different to linking them withinh one form. The strategy is that the second combo is based on a query that uses the first combo as a parameter. The first combo can be n any open form, but the query needs to specvify where the combo is. Use the Expression Builder for this.
    When you update the first combo, you need to requery the second. The code for the requery is a little bit more complicated.
    Instead of me.combosomething.requery, you need me.subform.combosomething.requery.

    Autofill occurs either via the link master and link child fields, or via setting the default value. The first method is the simpler, but sometimes the second is needed.

    I can't really follow the details of what you want to do. Can you post a demo?
    Regards
    John



  3. #3
    2 Star Lounger
    Join Date
    Jun 2003
    Location
    Indiana, USA
    Posts
    141
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Thanks John. I am familair with the two combo box approach and will work with that method.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •