Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing multiple several criteria from a function

Status
Not open for further replies.

Cage

MIS
Aug 25, 2002
50
CA
I am trying to build a query which will use mulitple criteria from a function.

For example a table contains 5 records, "A","B","C","D","E"

I would like to have the query display records "A","B","D" using a function, where the function return value is = "A,B,D"

Any ideas?

TIA

Cage

 
I'm assuming that you mean that you have a text value that contains the string "A,B,D". If that's the case then

Where InStr(1,MyString,Field) > 0

should do it where "MyString" is the variable containing "A,B,D" and "Field" is the table field that contains "A" or "B" Or "C", etc.
 
I don't think I explained it very well.

I have a table with Customer Preferences, for each preference I have assigned a binomial code eg preference 1 = 1, preference 2 = 01,preference 3 = 001, preference 4 = 0001 and so on. I now wish to create a query which will display the preferences of a particular customer.

The way I intend to do this is to give each customer a specific preference setting, eg 1101 would indicate that that customer has preferences 1,2 and 4.

Therefore I would like to pass 1, 01 and 0001 from a function to the criteria of a query. I have over 50 preferences therefore I need a way to pass mulitple criteria from a function.

Regards,

Cage


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top