IFF statement

TjS

Registered User.
Local time
Today, 21:38
Joined
Jul 18, 2007
Messages
126
Hellow :(

Question.....
i have a report in access on which grades of student are shown, like the following example:


Lifescience 6
Brainstorming 7
learningdev. 9
communication 5


My goal is to, next to the grades, also to put the grades as words...


Lifescience 6 six
Brainstorming 7 seven
Learningve. 9 nine
Communication 5 vife


I have no clue actually how to do that, i of course thought of an IIF statement, the only thing i know is the crystal reports syntax, but in this case i am not sure how to 'translate' it to the expression on the field.
(that is: i think i have to use the field where the grade comes from?)

Thanks for this, i think, relatively simple question........

Tj
 
Here's a starter;

=IIf(IsNull([Grade]),"No Grade",IIf([Grade]=1,"One",IIf([Grade]=2,"Two")))

This would go in the control source of the second box.
If you add an 'on change' event of the 'grade' number box of me.refresh that shall then update the second new gradetext box.

Hope that helps.
Matt
 
Going to be a messy Iif statement. Two alternatives. One is to use a case statement in a function and use the function in the query. The second is easier (and I like easy!). Create a table with two fields, one being the numeric value of the grade and the second being the text value. Join this table into the query that drives the report and pick up the text value.
 
Thanks

Thanks for the answers....


The IIf statement didn't work too properly, got an error first time that expression was to complex, so i indeed had to make a case statement, this worked fine,

but
Making the other table was something i had thought of, but i thought actually that it was not possible because the database where i get the data from is a readonly existing dabase (oracle), and i thought i couldn't link from the oracle database table to a new-made access table; but it works fine!


Thanks both for your solutions.
 

Users who are viewing this thread

Back
Top Bottom