Monday, 9 September 2013

Creating dynamic filters in Access 2010 Macros

Creating dynamic filters in Access 2010 Macros

In VBA I can build filter strings like
Me.Filter = "[" & Me!cmb_select_field & "] Like " & Chr(34) & "*" &
Me.txt_find_this & "*" & Chr(34)
Which produce a filter [Vendor_name] Like "Vancouver"
Given that cmb_select_field was selected as [Vendor Name] and
txt_find_this had Vancouver entered.
I am working with Access 2010 web pages on sharepoint so I can only use
macros. Is there a way to dynamically create filter strings in Macros. I
can get the string as a Local Variable but when I setfilter I get the
local variable name instead of the string

No comments:

Post a Comment