Table Filter with string as column name

jimjojac

New Member
Hallo
I want to use Table Filter function where the column name is a string because it can change between different tables. The code looks like:
Table1.Filter("name LIKE '*" & searchS & "*'") where "name" is in this case the real column name. It works fine, but I want it to use like:
Table1.Filter(Table1.ColName(0) Like ....), or

str=Table1.ColName(0)
Table1.Filter(str Like ...)
Is it possible? And if, how is the syntax to make it work?

Thanks
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…