Using a combobox for searching multiple fields in "option group"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • LeighW
    New Member
    • May 2012
    • 73

    #31
    No worries Z, thank you very much for the help anyway.

    I did what you asked but now when I click the button it prompts you to enter a parameter value.

    Comment

    • LeighW
      New Member
      • May 2012
      • 73

      #32
      I've managed to do it.

      Thanks so much for the help guys it's very much appreciated!

      To get it to work I used the Debug.Print bar on a search that worked to see how the syntax was laid out. I realised that these were using [fields] on the other form rather than the check boxes such as "chk_Permit 1". So I changed each of the checkbox names to the names of the fields on the other form i.e. "Permit1" and then made sure the syntax was the same.

      The format ended up being [Permit1] = -1.

      It now opens the form to that specific filter.

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32636

        #33
        As a simple qualification, checking for Permit3 and/or Permit5 (IE find all records that have either or both of them) can be as simple as :
        Code:
        ([Permit3]) OR ([Permit5])
        It's never necessary to compare Boolean values (Yes/No, True/False, CheckBoxes, ToggleBoxes, etc values are all Boolean).

        Filtering always works on fields rather than controls. You've done well to spot that. Filtering is a SQL process and SQL always works with the data and not the form as such. I hope that helps to clarify things.

        Comment

        Working...