-
Nesting IIf query
I currently have a field in a query set as
ActualPublishersShare: IIf([INCOME TYPE] Like "Perf*","0.005","0.0025")*100
This works very nicely
I need to include a "Sync*" parameter
I've tried
ActualPublishersShare: (IIf([INCOME TYPE] Like "Perf*","0.005","0.0025")*100), (IIf([INCOME TYPE] Like "Sync*","0.005","0.0025")*100)
and
ActualPublishersShare: IIf(Eval([INCOME TYPE] Like ("Perf*", “Sync*)),"0.005","0.0025")*100
plus other small variations. Access usually tells me I'm using too many parentheses but I'm sure it's not that (I've tried jsut about every possible combination). I pretty sure I'm making an elementary mistake in understanding the syntax.
If someone could elucidate I'd be very grateful
Peter
-
If I understand the goal correctly, try
IIf([INCOME TYPE] Like "Perf*" OR [INCOME TYPE] Like "Sync*","0.005","0.0025")*100
Given that you're performing math, I don't think you want the numeric values in quotes.
-
Solved
Thank you very much Sir. That worked perfectly (even with the quotes!)
peter
-
No problem, glad it worked for you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules