Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    3 Star Lounger
    Join Date
    Dec 2006
    Posts
    250
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to filtering subform (2003)

    Hello,

    I need to filter a subform by the "Program" field where the user will be required to input the "program" name. I would like to filter this subform based on a command button. The name of the subform is "frmbudget". The name of the main form is "FrmBud". Any help would be great. Thanks.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: How to filtering subform (2003)

    A subform is automatically filtered by the value of the field that links it to the main form. Do you want the filter on program to be added to the automatic filter?

  3. #3
    3 Star Lounger
    Join Date
    Dec 2006
    Posts
    250
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to filtering subform (2003)

    Yes. I think that is what I need to do.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: How to filtering subform (2003)

    Where would you like to place the command button? On the main form or on the subform?

  5. #5
    3 Star Lounger
    Join Date
    Dec 2006
    Posts
    250
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to filtering subform (2003)

    I am actually creating a switchboard like form. I was going to create the command buttom there and put the name of the program. I want the main form to display there and the subform filter.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: How to filtering subform (2003)

    I don't understand. Can you explain why you want to open a main form / subform from your switchbard form with the subform filtered?

  7. #7
    3 Star Lounger
    Join Date
    Dec 2006
    Posts
    250
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to filtering subform (2003)

    Sure. I will try. I have a main form where a user puts in invoice information. For an invoice to be approved, I have to make sure that there is a budget to pay from. This budget is the subform, however, a company can have multiple program budgets. I hope this makes sense.

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: How to filtering subform (2003)

    But why don't you put a combo box on the subform to select a program? I don't understand why you want to filter from the switchboard form.

  9. #9
    3 Star Lounger
    Join Date
    Dec 2006
    Posts
    250
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to filtering subform (2003)

    Well it is not a switchboard item but a command button in a form. I am going to use this form as a "switchboard". I could put a combo box in the subform, but that means that the user will have one more click and may confuse them. I am sorry if I am making this more confusing.

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: How to filtering subform (2003)

    I'm afraid I don't really understand what you want, or why you want to do it this way.

    Could you post a stripped down copy of your database? See <post#=401925>post 401925</post#> for instructions.

  11. #11
    3 Star Lounger
    Join Date
    Dec 2006
    Posts
    250
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to filtering subform (2003)

    The main form I need to open is call "frmManagerMain". You will see that there are three tabs. Each with a subform. The first tab has the budget information. This is the one I would like to open up filter to for each program. The "Switchboard" form is where the command button is going to be place to do so. When you open the frmManagerMain it will ask you for a password. Please enter Fang (User last name) as the password. By the way, you will see that most of the VBA coding use on this database has come from your recommendations which I am extremely thankful.
    Attached Files Attached Files

  12. #12
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: How to filtering subform (2003)

    See the attached version. I placed a combo box on the switchboard form from which you can select a program. Clicking the command button next to it will open frmManagerMain.
    If you selected a program, the first subform will be filtered for this program. If the you left the combo box blank, all programs will be displayed.
    Attached Files Attached Files

  13. #13
    3 Star Lounger
    Join Date
    Dec 2006
    Posts
    250
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to filtering subform (2003)

    Thanks Hans. But I am afraid I still have the same issue where the subform shows all the programs budgets and not the one for each program. Attached is a screen copy of what I wanted to see when I press the HOPE command button in the switchboard. Thanks for trying to help though
    Attached Files Attached Files

  14. #14
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: How to filtering subform (2003)

    Instead of pressing the HOPE button, select HOPE in the combo box, and click the Show Form button next to it.

  15. #15
    3 Star Lounger
    Join Date
    Dec 2006
    Posts
    250
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to filtering subform (2003)

    Hans,

    When I select combo box option "HOPE" and click on show form button, I still get both budgets in the subform. Am I doing something wrong?

Page 1 of 2 12 LastLast

Posting Permissions

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