Yes the field name is PHQ_Depress_Diag where the data is store as 0,1,2. And
on the form the text box which I want to display this result is named the
same PHQ_Depress_Diag.
No I am not trying to assign this to a field. I am working on a report and
want to just convert the 0,1,2 into text.
So do I have to change the name of the text box on the report
Jackie L said:
The formula needs to be the control source of a field other than
PHQ_Depress_Diag. You cannot have the field named the same as a field in the
formula.
What about the other questions I had? Are they pertinent at all?
:
The name of the field is PHQ_Depress_Diag on the form. In the control source
I put the statement that you gave me. And when I close out of the properties
box the statement does not stay in there and is blank.
:
What field do you have it in the control source? The field cannot be named
PHQ_Depress_Diag. What do you mean by "it doesn't seem to be going to the
control source"? Are you trying to assign this value to a field? With a
formula as a control source, the value is not being saved. It only exists on
the form. If it needs to be saved in a field let me know.
:
it doesn't seem to be going into the control source. I put it in there but
it doesn't stay. Is there something wrong with the statement that you have
provided or is there something else I have to do.
:
Is your field PHQ_Depress_Diag a text or number? If it is text, then the
statement should be
=IIF([PHQ_Depress_Diag]="0","0",IIF([PHQ_Depress_Daig]="1","Other","Major")
Hope this helps.
:
I have this statement in a fields control source:
=IIf([PHQ_Depress_Diag]=1,"Other","Major")
I am getting a #error on the report
Also I don't know if I am doing this right but there are 3 possible answers
for PHQ_Depress_Diag 0,1,2.
What I want to display on the for is
if 0 then display 0
if 1 then display Other
if 2 then display Major
Am I going about this right?