A
awach
Is there a way to make a field in a report not appear if the corresponding
value in the table is null/empty?
value in the table is null/empty?
Duane Hookom said:Change the control source of the text box to something like:
=IIf([YourField] = 0, Null, [YourField])
You should then be able to set it to allow shrinking.
--
Duane Hookom
MS Access MVP
awach said:The null value is "0". I suppose I could make it nothing (this isn't
ideal
for the table so if there is another way, let me know). But I'm also
trying
to see if there is a way to shift the rest of the report up if there isn't
a
value so that there isn't a big gap on the page. Have any ideas?
awach said:So, will this code still allow the information to appear if the field
isn't
null? How do I then "allow shrinking"?
Duane Hookom said:Change the control source of the text box to something like:
=IIf([YourField] = 0, Null, [YourField])
You should then be able to set it to allow shrinking.
--
Duane Hookom
MS Access MVP
awach said:The null value is "0". I suppose I could make it nothing (this isn't
ideal
for the table so if there is another way, let me know). But I'm also
trying
to see if there is a way to shift the rest of the report up if there
isn't
a
value so that there isn't a big gap on the page. Have any ideas?
:
Isn't this the default behavior? If a text box contains a null value,
what
are you seeing?
--
Duane Hookom
MS Access MVP
Is there a way to make a field in a report not appear if the
corresponding
value in the table is null/empty?
awach said:I also have another field=field1 (which has to do with field2, the one I
was
referencing before) that may or may not contain information. However, its
default is null. So, if I have a value in field1 I want to display
field2,
even if the vaule is 0. If I don't have a value in field1 I don't want to
display either of them. I thought that I would use =IIf([TradFIInv
Allocation2]=0 & [Trad Inv2]=Null,Null,[TradFIInv Allocation2]), however
this
isn't working. Any ideas?
Duane Hookom said:I also should have mentioned that if you change the control source to an
expression, you may need to change the name of the text box so it is not
the
same as the name of a field.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.