Need Help With Expression

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

Guest

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
 
=IIf(IsNull(NameOfFieldToCheckIfBlank),"",Forms![F-2426-Data-Multi-Print]!Li
st136.Column(0))

Watch word wrap!
 
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
(e-mail address removed)
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
(e-mail address removed)
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
 
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
(e-mail address removed)
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
(e-mail address removed)
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
 
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
(e-mail address removed)
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
(e-mail address removed)
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
 
=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
(e-mail address removed)
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
(e-mail address removed)
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
 
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
(e-mail address removed)
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
(e-mail address removed)
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
 
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
(e-mail address removed)
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
(e-mail address removed)
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
 
Back
Top