printing data from if statement

Alkaline

Registered User.
Local time
Today, 13:36
Joined
Sep 15, 2007
Messages
18
I want to print [FirstName] from a query if [Inactive], which belongs to the same query, is true. This give me #error:
=IIf([Inactive],[FirstName],"")

However this works:
=IIf([Inactive],"<inactive","")

and so does this:
=[FirstName]

not sure why a combination of the two gives me #error
 
So your only trying to print all the first names that are flagged as Inactive? Is this field a check box ? or does it actually say "Inactive"

Either way it just sounds like just you need to put criteria in your query to restrict the output..either put "TRUE" or "Inactive" ?
 
Well, I guess I will tell you my whole problem. I want to print a list of names with the text "<Inactive>" in front of it only if [Inactive] is true. It works when I do that in two separate textfields, but for formatting issues, I want it do be done entirely in 1 text field.
 
Yes I can access them and display their values on the report
 
You can access them because they are in the underlying query, but that's not the question I asked, are these fields already on the report when you try and add the calculated field to it?
 
They weren't on the actual report intially, but I just added them now and nothing changed by there mere presence. I don't see why when I just want to do the same thing, just use the data to print out in a If statement that they wont display.
 
In the underlying query add a new field Status:IIf([Inactive]=True,[FirstName],"Active")
see if the query displays the result
 
Ah, that works. Its dissapointing that this couldn't be accomplished as easily in the report, but thankyou for helping me get the same end result :)
 

Users who are viewing this thread

Back
Top Bottom