Display Value if True

sokkerkid13

Registered User.
Local time
Today, 12:07
Joined
Sep 15, 2010
Messages
15
I have a table full of fields with yes/no checkboxes. I would like to create a report that would list all of the fields iff they are true. The checkbox fields I have are symptoms of a product we manufacture, I would like to be able to view case by case all the symtoms listed out in words, rather than viewing miles of checkboxes, thanks for any advice

Tim
 
Is the IIF function helpfull?
IIF([TummyAcheCheckbox], "Tummy ache", "")

alternative ways are possible... however I think there is a design issue here, You dont want to have a bunch of check boxes were probably 90+% of them will be false/default.

Wouldnt it be better to have a symptoms table? Where you add records...
I mean what if you dont have an Headache as a symptom yet, in the current design adding that is a potential nightmare...
While in my suggested design it would be a snap.
 
I do see your point, but in this case we have a production line with many widgets being processed daily. Our builders check off what they see is wrong with each widget, then it moves along the production line and new data is never added, so only one data logging session occurs per builder per widget.

Where exactly would you include that IFF function? I have not gotten deep into the code side of access, more into the simple gui, thank you for your help!
 
You use IIF as a function in a query (builder)
 
So i tried the method that you suggested, in criteria I put:
IIf([Q:1:W/R DOME],"W/R DOME","")
And I am getting the error:
Data Type Mismatch in Criteria Expression,

What Exactly am I doing wrong?
 
Tim,

Can you upload a sample of your report with a table?
 
I just realized that I have begun working on a query instead of a report, how exactly would I upload that onto the board (sorry im new to this stuff)
 
use the post reply (not the quick reply), then scroll down and look for a button that says manage attachments.
 
This is incorrect syntax:

IIf([Q:1:W/R DOME],"W/R DOME","")

You need to compare the field to something. If it is equal to something? So, if it is a Yes/No field then you would use something like this:

IIf([Q:1:W/R DOME]<>0,"W/R DOME","")
 
Nevermind I thought it didn't work like VBA where you can shorten it without the true. But I just tested and it does work that way. Chalk up a new one there :D
 
I still get the same error if i use the expression:
IIf([Q:1:W/R DOME]>0,"W/R DOME","")
 
If it is a yes no field you use <>0 not >0 because yes is -1 and therefore smaller than 0.

Also, do not use special characters in names like that. Those can also cause you pain and suffering.
 
IIRC, you dont want it as a critiria, instead you want to show this value in the report...

Hence you use it in the top most line of the designer, not in the criteria
 

Users who are viewing this thread

Back
Top Bottom