Donate SIGN UP

Access Coding help

Avatar Image
tpreece01 | 00:37 Thu 14th May 2009 | Computers
3 Answers
Here we go:
I've got an Access 2003 database that records errors.

A table (simplified):
[user] [error]
Each type of error is allocated a points value in a linked table:
[error] [points]

A query pulls this together & shows how many points each user has accumulated over a given period. ie:
user1 6
user2 2
user3 9
user4 12
user5 3

Now I want to grade each user:
0-4 points = grade 1
5-9 points = grade 2
10+ points = grade 3

The results are to be output to a report.

So, whats the best way to have Access work out the grading?

I've got a similar type of question that I'll post separately...

Gravatar

Answers

1 to 3 of 3rss feed

Best Answer

No best answer has yet been selected by tpreece01. Once a best answer has been selected, it will be shown here.

For more on marking an answer as the "Best Answer", please visit our FAQ.
How about:
Select (if points>9 then 3 else if( points>4 then 2 else 1)) as Grade
In Access it should be an expression in a query, and should be:
grade1: IIf([points]>9,3,IIf([points]>4,2,1))

NB IIf is correct and not a typo!

Use expression builder in MS Access
Here's the query with it being used.
http://docs.google.com/Doc?id=dfzbst2k_28897q9 qhk

1 to 3 of 3rss feed

Do you know the answer?

Access Coding help

Answer Question >>

Related Questions

Sorry, we can't find any related questions. Try using the search bar at the top of the page to search for some keywords, or choose a topic and submit your own question.