I have posted a similar question a while back but never recieved an answer.
I want to set the query criteria from my form - However, I want the criteria to equal any of 5 possibilities.
Basically, I run a function that returns the criteria to a field on the form based on the users signon.
For example, here is what is populated in the field on my form:
'Broker1' Or 'Broker2' Or 'Broker3'
In my function that populates the field I have a select case but the data is:
Case UserName:
GetBroker = " 'Broker1' Or 'Broker2' Or 'Broker3' "
And my query criteria is:
[forms]![sacspecific]![brokers]
Am I missing something or can this not be done?
When I copy the text right from the field on my form and paste it over the query criteria, the query works fine?????
Thanks!!!!
Fred
I want to set the query criteria from my form - However, I want the criteria to equal any of 5 possibilities.
Basically, I run a function that returns the criteria to a field on the form based on the users signon.
For example, here is what is populated in the field on my form:
'Broker1' Or 'Broker2' Or 'Broker3'
In my function that populates the field I have a select case but the data is:
Case UserName:
GetBroker = " 'Broker1' Or 'Broker2' Or 'Broker3' "
And my query criteria is:
[forms]![sacspecific]![brokers]
Am I missing something or can this not be done?
When I copy the text right from the field on my form and paste it over the query criteria, the query works fine?????
Thanks!!!!
Fred