Please Help Me!!!!

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!
 
D

Dave

SELECT iif([tbl_Table].[Discount],8,0) AS DiscountAmount FROM tbl_Table

Hope this helps
Dave
 
B

Brendan Reynolds

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.
 
V

Vladimir ferreira

Please i do not know you the answer to you quetion
Sorry about it buy, buy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top