Query Expressions

blacktide

Registered User.
Local time
Today, 17:02
Joined
Oct 10, 2003
Messages
31
To help keep this simple I have a query that has 3 fields.
1 = R/T/W/S/E
2 = TOTAL
3 = 5% DISCOUNT

My 5% DISCOUNT field looks like this
5% DISCOUNT [TOTAL]*0.05 which means that everything gets the 5% Discount. How can I write an exprssion that will let me say that when the R/T/W/S/E field = R you get the 5% Discount? I know I could put "R" as the critera for R/T/W/S/E, but that would only let the things with "R" show up. I need everything to show up, but only those with an "R" get the 5% Discount. Maybe I should be going about this a different way, but as I am really to this I am not even sure where to look for an answer other than here.

Thanks,

Michael
 
Try

IIf([R/T/W/S/E] = "R", [TOTAL]*0.05, 0)
 
Like a charm

pbaldy,

That worked like a charm!! Thank you for replying to my post. I didn't really understand the IIF expression and know seeing how it works I get it. It also helped me to realize a few other things that I could do, ie, IIF([MFG]="abc",IIF([R/T/W/S/E]="R",[ROYALITY],45))
This all just made my day!!!!!!!!!!

Thanks again,

Michael
 

Users who are viewing this thread

Back
Top Bottom