Solve the queries

  • Thread starter Thread starter hemachandra
  • Start date Start date
H

hemachandra

Guest
Dear My Friends

I want to solve the follwing matter.

** Enter-Invoive Number
** Enter-Amount


If the amount 1000> - Show stamp duty as $1

If the amount 1001-2000 -Show stamp duty as $.2

If the amount 2001-3000 - Show stamp duty as $3

If the amount 3001-4000 -Show stamp duty as $4

Like wise upto 50,000

If the amount 50,000 < Show stamp duty as $50

I want to above results in access report with name of invoce number, amount and stamp duty .Please help as soon as possible
 
Create a query that selects the data you require from your table.
in the same query add the following column;

Stamp: IIf([amount]<=1000,1,IIf([amount] Between 1001 And 2000,2,IIf([amount] Between 2001 And 3000,3,IIf([amount] Between 3001 And 4000,4))))

Just keep going until you reach the end of your values and rember to hav the smae number of close brackets as you have IIF's
 

Users who are viewing this thread

Back
Top Bottom