Me too
Actually, I'd like to suggest rather than a hidden field (or in addition to), how about a property that can just be set to some arbitrary filter. This could either be set in the property sheet or via code and would be a base filter that the user would not have any control over. I would suggest that it even be parameterless (I.e. the filter is built as it is needed by the DB), since only the developer would set the value. Take this value, wrap it in parentheses and 'AND' it to the user provided filter (if the user provided a filter, of course).
E.g.
Property called something like StaticFilter.
In code you'd set it to something like:
BrowserForm1.StaticFilter = "Country='us'"
or
BrowserForm1.StaticFilter = "CountryCode=1"
The resulting where clause would look like (of course, parameters would likely actually be used for the user entered parameters):
Where (Country='us') And (lastname='jones%')
where the user entered 'jones' for the lastname filter.
I'm currently implementing my own version of the BrowseForm, because I MUST have this feature. I have row level security, and while I can enforce that easily via appropriate FillBy methods of a BO, I need to also enforce that when the user searches (they effectively can only search the rows they have access too). If there is something terribly wrong with this idea, please let me know, as I'll be using it soon
Thanks and I hope you all had a good break!