table filter matter

Discussion in 'Questions (Windows Mobile)' started by francisco cobos, May 31, 2007.

  1. francisco cobos

    francisco cobos Member Licensed User

    How can I make a filter in table with a number variable?

    ' instead of: Table1.Filter("posx = 118") I want to use:

    '********************
    a = 118
    Table1.Filter("posx" & " '< a'") ' but it doesn't work
    '***********************

    any idea?

    Thanks in advance
     
  2. RandomCoder

    RandomCoder Well-Known Member Licensed User

    Try one of these two methods....

    a = 118
    Table1.Filter("posx" & a) ' should filter using value posx118

    OR

    a = 118
    posx="posx"&a
    Table1.Filter(posx) ' should filter using value posx118

    Sorry but I'm working at the moment and don't have time to test myself.

    Regards,
    RandomCoder
     
  3. BjornF

    BjornF Active Member Licensed User

    You could write it all into one:

    a = 118
    Table1.Filter("posx <" & a)

    (Randomcoder - I think you might have missed the "<" in your example ;))

    all the best / Björn
     
  4. specci48

    specci48 Well-Known Member Licensed User

  5. RandomCoder

    RandomCoder Well-Known Member Licensed User


    BjornF, well spotted. But in actual fact it was an = sign that I missed :signOops:

    Regards,
    RandomCoder
     
  6. francisco cobos

    francisco cobos Member Licensed User

    Thanks for all, finally this works well: (I tried to use compare operators like "<", ">", etc.)

    a = 118
    posx="posx<"&a
    Table1.Filter(posx)

    Best regards
     
Loading...