Please Help Me!!!!

  • Thread starter Thread starter joe2003
  • Start date Start date
J

joe2003

I have a querry that I want to create, it applies to a table with a tick
box which means that the field with the tick box can have discount,
basic all I want to do is:-

IF [discount] = true then 8 else 0

Basically, if the discount box is ticked then it assigns the value 8
and if it is not it assigns the value 0. This is not really what I want
to do, I need to calculate a percentage but it will do as an
explanation.

Can anyone help me, you must be able to do it!
 
SELECT iif([tbl_Table].[Discount],8,0) AS DiscountAmount FROM tbl_Table

Hope this helps
Dave
 
SELECT IIf([Discount]=True,8,0) AS Percentage
FROM tblTest;

In query design view, the expression (in the 'Field' row) looks like this
....

Percentage: IIf([Discount]=True,8,0)

'Percentage' is just a name for the calculated field, you can call it
whatever you like.
 
Back
Top