Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query Help

Status
Not open for further replies.

KeZ

IS-IT--Management
Joined
Oct 29, 2001
Messages
4
Location
GB
Hello,
I am building a database on sales and commission.
I have hit a brick wall on a specific query.
The query is basing the commission rate off of the total sales amount.
As in
Sales<100000=5%commission
Sales>100000 but <200000=4%commission
Sales >200000 but <300000=3%commission
And so on
Each time I have tried to build the expression it answers with errors.
Please help!
Kelly
 
Cant be too specific since I am not sure of your query or table structure but I do want to suggest you look at using the switch function
switch(Sales<100000,5%,Sales between 100000 and 200000,4%,Sales between 200001 and 299999,3%)
has example under access help
or IIF() may also do it.
good luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top