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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple IIF statement

Status
Not open for further replies.

kastaman

IS-IT--Management
Sep 24, 2001
181
0
0
CA
Hi there,

We have 3 clients that have 3 parameters that would identify the cliet:

CLIENT Parameter 1 Parameter 2 Parameter 1
Alpha [Form] = 2320 [JobName]= *HBC* [Printer] = x*
Beta [Form] = 83* [JobName]= *BIZ* [Printer] = p*
Sigma [Form] = legal [JobName]= Mel* [Printer] = *

I'd like to create an IIF statement in my query so that if the parameters are met, the client name appears.


Thanks in advance,

Kastaman
 
I'm not sure you need IIF. Surely you've just got three separate WHERE conditions which need to be AND-ed or OR-ed.

 
BNPMike,

If I use the WHERE, could I use this as an expression statement where the result would be the Client:

WHERE[Form]='2320' AND [JobName]='*HBC*'AND [Printer]='x*'

Field = Alpha.





Thanks in advance,

Kastaman
 
I think I see what you are doing. Use the power of Jet. Create a table (Form, Jobname, Printer, Client) and just join to it. Don't declare a key - if you do Jet will create an index which in turn will mean you need two page fetches. Your three items (plus quite a bit of growth) will all fit on one page so an index is pointless.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top