-1 value to pass or fail!

simon4amiee

Registered User.
Local time
Today, 06:56
Joined
Jan 3, 2007
Messages
109
Hi all I have a field that returns either -1 or 0, -1 I need to convert to Fail and 0 I need to convert to pass in a separate field, any ideas!
 
first, is your field defined as a Text/Number or YesNo

if it can only be true or false, then it is better to use YesNo, in my opinion

----------
secondly where do you want to see this Pass/Fail

because you do not need to store this, as you already have the pass/fail value from your
yesno (or other field)

you can display the yesno value in a number of ways

as text using iif
Code:
 [B]   iif(yesnofield, "Pass","Fail")[/B]

as text using if then
Code:
[B] if yesnofield then
   mytext =  "Pass"
 else
   mytext= "Fail"
end if[/B]

or as a combo box, using a value list as the cbobox source
 
Something like:

Exp1: iif([MyFieldName],"Pass","Fail")

Edit: Husky's fast this morning - :p
 
or dont get me on that took ages to get there, i needed from a badly organised database to calulate a field in a query based on the answer to 20+ questions, if one question returned No then the forumala I used all be it long winded was:

Expr1: (([A1] & [A2] & [A3] & [A4] & [A5] & [B1] & [B2] & [B3] & [B4] & [B5] & [B6] & [C1] & [C2] & [C3] & [C4] & [C5] & [C6] & [C7] & [C8] & [D1] & [D2] & [D3] & [D4]) Like "*No*")

This then returned either -1 or 0, thus I then ran a query on all -1 results thus showing me all the people who failed.

However Ive now been told it has to show this on a report, surely in a report as PASS or FAIL its a case of formatting the field, i may be wrong!
 

Users who are viewing this thread

Back
Top Bottom