VickiS said:
I have a report that contains 2 fields - [Pass / Fail] and [Mapping
Instruction]. I only want to show the Mapping Instruction field contains
"Fail". What is the statement I need to put in the Control Source for Mapping
Instruction?
It is possible that a few words were lost from your question. Did you mean
"I only want the [Mapping Instruction] to be visible if the [Pass / Fail]
field contains "Fail"?
First, let me offer the suggestion that you can save yourself some possible
irritation if you do not use spaces in Field names. Assuming that the field
[Mapping Instruction] is displayed in Control txtMapInst and the field [Pass
/ Fail] is displayed in txtPassFail, you can put in the Print event of the
section:
If Me!txtPassFail = "Fail" Then
Me!txtMapInst.Visible = True
Else
Me!txtMapInst.Visible = False
End If
or, shorter but not as clear:
Me!txtMapInst.Visible = (Me!txtPassFail= "Fail"
The Control Source will let you set the value, but not the Visible property.
And, you can only use the "Me" notation in code.. you'd have to have a long
IIF with fully qualified references, so I wouldn't use the Control Source
for this purpose, although it _could_ be used.
Larry Linson
Microsoft Access MVP