table filter matter

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
 

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
 

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
 

RandomCoder

Well-Known 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:
(Randomcoder - I think you might have missed the "<" in your example )

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

Regards,
RandomCoder
 

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
 
Top