filtering problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • micka
    New Member
    • Jun 2006
    • 1

    filtering problem

    hi,
    i want to filter fields in a table on my form but the problem is that the field (Included/Excluded) in the table is in the format of YES/NO. i dont mind if the filter on my form is in the form of a list box, option button or a check box but i want to be able to search for all records, included or excluded.
    the way that i have tried to do it is by creating the subform in my form to show the data. this is liked back to the table through a query where i have all the other filters working (eg date, state, store ect). i have then created another table displaying the options i want to be able to choose which is linked back to the list box on my form. this doesnt work.
    can anybody please help.
    URGENT!!!
  • CaptainD
    New Member
    • Mar 2006
    • 135

    #2
    If you're using Access, the option button can be set to "triple state" which gives you three values. Null, -1 and 0

    Do a Case statement to set your filter values based of the option button value

    Comment

    • Seun Ojo
      New Member
      • Aug 2006
      • 14

      #3
      u can try using yes or no is ur filter query....someth ing like:
      select * from news where archive = yes

      or

      select * from news where archive = no

      depending on wot ur intentions are....

      i expect u 2 make ur filter query dynamic...so dat d value parts are dependent on wot is returned from d form...

      As for d form part...I suggest u make use of checkbox....
      so on the action page...if d form variable exists...den dats a yes [for ur dynamic query]...no is implied in d opposite case....

      will like to help u further...but pls....try re-explaining d problem...coz its only half clear!

      take care...

      Comment

      Working...