Need Help With Expression

G

George

On my report it basically displays data it gets from an open form. On one of
my report's fields I "Don't" want it to display any info that it gets from
the field mentioned below if a particular Form field is Blank, how would I
write that expression. Here is what I have in the "Control Source" of my
report field:

=Forms![F-2426-Data-Multi-Print]!List136.Column(0)

Remain blank is this field is blank...

=Forms![F-2426-Data-Multi-Print]!Text46

Thanks - George
 
P

PC Datasheet

=IIf(IsNull(NameOfFieldToCheckIfBlank),"",Forms![F-2426-Data-Multi-Print]!Li
st136.Column(0))

Watch word wrap!
 
P

PC Datasheet

Correction ----


=IIf(IsNull(Forms![F-2426-Data-Multi-Print]!Text46),"",Forms![F-2426-Data-Mu
lti-Print]!List136.Column(0))

Watch word wrap!


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
[email protected]
www.pcdatasheet.com

PC Datasheet said:
=IIf(IsNull(NameOfFieldToCheckIfBlank),"",Forms![F-2426-Data-Multi-Print]!Li
st136.Column(0))

Watch word wrap!


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
[email protected]
www.pcdatasheet.com




George said:
On my report it basically displays data it gets from an open form. On
one
of
my report's fields I "Don't" want it to display any info that it gets from
the field mentioned below if a particular Form field is Blank, how would I
write that expression. Here is what I have in the "Control Source" of my
report field:

=Forms![F-2426-Data-Multi-Print]!List136.Column(0)

Remain blank is this field is blank...

=Forms![F-2426-Data-Multi-Print]!Text46

Thanks - George
 
G

George

When I enter the 2nd expression you gave me in the Control Source field I get
an error message " Expression you entered contains an invalid syntax"

What should I change ?

Thanks

PC Datasheet said:
Correction ----


=IIf(IsNull(Forms![F-2426-Data-Multi-Print]!Text46),"",Forms![F-2426-Data-Mu
lti-Print]!List136.Column(0))

Watch word wrap!


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
[email protected]
www.pcdatasheet.com

PC Datasheet said:
=IIf(IsNull(NameOfFieldToCheckIfBlank),"",Forms![F-2426-Data-Multi-Print]!Li
st136.Column(0))

Watch word wrap!


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
[email protected]
www.pcdatasheet.com




George said:
On my report it basically displays data it gets from an open form. On
one
of
my report's fields I "Don't" want it to display any info that it gets from
the field mentioned below if a particular Form field is Blank, how would I
write that expression. Here is what I have in the "Control Source" of my
report field:

=Forms![F-2426-Data-Multi-Print]!List136.Column(0)

Remain blank is this field is blank...

=Forms![F-2426-Data-Multi-Print]!Text46

Thanks - George
 
G

George

Re-entered expression and what I get is #name? ( on the report field ) where
the data from the list136 comes from if text46 is not blank.

George

PC Datasheet said:
Correction ----


=IIf(IsNull(Forms![F-2426-Data-Multi-Print]!Text46),"",Forms![F-2426-Data-Mu
lti-Print]!List136.Column(0))

Watch word wrap!


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
[email protected]
www.pcdatasheet.com

PC Datasheet said:
=IIf(IsNull(NameOfFieldToCheckIfBlank),"",Forms![F-2426-Data-Multi-Print]!Li
st136.Column(0))

Watch word wrap!


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
[email protected]
www.pcdatasheet.com




George said:
On my report it basically displays data it gets from an open form. On
one
of
my report's fields I "Don't" want it to display any info that it gets from
the field mentioned below if a particular Form field is Blank, how would I
write that expression. Here is what I have in the "Control Source" of my
report field:

=Forms![F-2426-Data-Multi-Print]!List136.Column(0)

Remain blank is this field is blank...

=Forms![F-2426-Data-Multi-Print]!Text46

Thanks - George
 
P

PC Datasheet

=IIf(IsNull(Forms![F-2426-Data-Multi-Print]!Text46),"",Forms![F-2426-Data-Mu
lti-Print]!List136)

I don't see any syntax problem here. Did you put a double quote after
Text46? Check your parantheses. You don't need Column(0) because that's the
value of the listbox if the boundcolumn is 1. Copy and paste the above.

Steve
PC Datasheet

George said:
When I enter the 2nd expression you gave me in the Control Source field I get
an error message " Expression you entered contains an invalid syntax"

What should I change ?

Thanks

PC Datasheet said:
Correction ----


=IIf(IsNull(Forms![F-2426-Data-Multi-Print]!Text46),"",Forms![F-2426-Data-Mu
lti-Print]!List136.Column(0))

Watch word wrap!


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
[email protected]
www.pcdatasheet.com

=IIf(IsNull(NameOfFieldToCheckIfBlank),"",Forms![F-2426-Data-Multi-Print]!Li
st136.Column(0))

Watch word wrap!


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
[email protected]
www.pcdatasheet.com




On my report it basically displays data it gets from an open form.
On
one
of
my report's fields I "Don't" want it to display any info that it
gets
from
the field mentioned below if a particular Form field is Blank, how
would
I
write that expression. Here is what I have in the "Control Source" of my
report field:

=Forms![F-2426-Data-Multi-Print]!List136.Column(0)

Remain blank is this field is blank...

=Forms![F-2426-Data-Multi-Print]!Text46

Thanks - George
 
P

PC Datasheet

I hope by now you saw my later response.

If the first time you got a syntax error and reentering you got the #Name
error, the problem is in what you are typing. You can copy and paste from my
email.

Steve
PC Datasheet



George said:
Re-entered expression and what I get is #name? ( on the report field ) where
the data from the list136 comes from if text46 is not blank.

George

PC Datasheet said:
Correction ----


=IIf(IsNull(Forms![F-2426-Data-Multi-Print]!Text46),"",Forms![F-2426-Data-Mu
lti-Print]!List136.Column(0))

Watch word wrap!


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
[email protected]
www.pcdatasheet.com

=IIf(IsNull(NameOfFieldToCheckIfBlank),"",Forms![F-2426-Data-Multi-Print]!Li
st136.Column(0))

Watch word wrap!


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
[email protected]
www.pcdatasheet.com




On my report it basically displays data it gets from an open form.
On
one
of
my report's fields I "Don't" want it to display any info that it
gets
from
the field mentioned below if a particular Form field is Blank, how
would
I
write that expression. Here is what I have in the "Control Source" of my
report field:

=Forms![F-2426-Data-Multi-Print]!List136.Column(0)

Remain blank is this field is blank...

=Forms![F-2426-Data-Multi-Print]!Text46

Thanks - George
 
G

George

Perfect - You were correct - When I copied and pasted into the Control Source
field some of the expression was getting cut off because of the length,
corrected that and it works .. Thanks for your time and efforts..

George

PC Datasheet said:
I hope by now you saw my later response.

If the first time you got a syntax error and reentering you got the #Name
error, the problem is in what you are typing. You can copy and paste from my
email.

Steve
PC Datasheet



George said:
Re-entered expression and what I get is #name? ( on the report field ) where
the data from the list136 comes from if text46 is not blank.

George

PC Datasheet said:
Correction ----


=IIf(IsNull(Forms![F-2426-Data-Multi-Print]!Text46),"",Forms![F-2426-Data-Mu
lti-Print]!List136.Column(0))

Watch word wrap!


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
[email protected]
www.pcdatasheet.com


=IIf(IsNull(NameOfFieldToCheckIfBlank),"",Forms![F-2426-Data-Multi-Print]!Li
st136.Column(0))

Watch word wrap!


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
[email protected]
www.pcdatasheet.com




On my report it basically displays data it gets from an open form. On
one
of
my report's fields I "Don't" want it to display any info that it gets
from
the field mentioned below if a particular Form field is Blank, how would
I
write that expression. Here is what I have in the "Control Source" of my
report field:

=Forms![F-2426-Data-Multi-Print]!List136.Column(0)

Remain blank is this field is blank...

=Forms![F-2426-Data-Multi-Print]!Text46

Thanks - George
 
Top