If Statement

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am working on a report with the following fields

Element Finding Error Code
10 1
11 2 4
12 2 3
13 2 1
14 1

I would like to only show the Element/Finding/Error Code for cases that have
a finding of 2.

Thanks in advance for any help. Am new to this.
 
Change the ControlSource of the Element text box to:
=IIf([Finding]=2, [Element], Null)
Then change the Name of that control to something else: Access gets confused
if a control has the same Name as a field, but is bound to an expression.
 
Thanks Allen for your suggestion, however when I change this in the Control
Source it also elimanates the Element and Finding for cases with code 2.

Thanks

Allen Browne said:
Change the ControlSource of the Element text box to:
=IIf([Finding]=2, [Element], Null)
Then change the Name of that control to something else: Access gets confused
if a control has the same Name as a field, but is bound to an expression.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Lou said:
I am working on a report with the following fields

Element Finding Error Code
10 1
11 2 4
12 2 3
13 2 1
14 1

I would like to only show the Element/Finding/Error Code for cases that
have
a finding of 2.

Thanks in advance for any help. Am new to this.
 
Perhaps Finding is a Text field, not a Number field?

If so, you need extra quotes:
=IIf([Finding]="2", [Element], Null)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Lou said:
Thanks Allen for your suggestion, however when I change this in the
Control
Source it also elimanates the Element and Finding for cases with code 2.

Thanks

Allen Browne said:
Change the ControlSource of the Element text box to:
=IIf([Finding]=2, [Element], Null)
Then change the Name of that control to something else: Access gets
confused
if a control has the same Name as a field, but is bound to an expression.


Lou said:
I am working on a report with the following fields

Element Finding Error Code
10 1
11 2 4
12 2 3
13 2 1
14 1

I would like to only show the Element/Finding/Error Code for cases that
have
a finding of 2.

Thanks in advance for any help. Am new to this.
 
Back
Top