Can shrink property re sent

  • Thread starter Thread starter PAOLO
  • Start date Start date
P

PAOLO

So how if I design a report which has labels describing each field and I
want to make invisible the ones that don't have anything typed in (by saying
invisible I mean like can shrink where you can't even see on the report
there was another field set up) is it possible to write a VBA code like

If (IsNull([fieldname])) Then
[labelname]???? canshrink
End If

Something similar to this?

Thanks for your help


Arvin Meyer said:
No, You cannot have anything else visible on the same line.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access

PAOLO said:
Thanks Fred

So if you set up the field to "can shrink" and the field is blank will
access hide the label linked to that as well?
report
 
Try

Me.LabelName.Visible = False

assuming the code is executed in the context of the Report (so that Me makes
sense.)
 
and the field and label underneath would actually move up in the report?

Van T. Dinh said:
Try

Me.LabelName.Visible = False

assuming the code is executed in the context of the Report (so that Me makes
sense.)

--
HTH
Van T. Dinh
MVP (Access)



PAOLO said:
So how if I design a report which has labels describing each field and I
want to make invisible the ones that don't have anything typed in (by
saying
invisible I mean like can shrink where you can't even see on the report
there was another field set up) is it possible to write a VBA code like

If (IsNull([fieldname])) Then
[labelname]???? canshrink
End If

Something similar to this?

Thanks for your help
 
Do you mean that there are other Control(s)??? on the same horizontal line
and you want to "synchronise" the CanShrink of the onther Controls(s) and
simulate the CanShrink of the Label using code?

My guess is that it won't since the code (I assume in the Detail_Format
Event) is executed before the auto-formatting done by Access where the
CanShrink Property is apply. However, you already have the Report set up
and it is easy for you to try it out! That how most of us find out how
things work is Access rather than waiting for someone else to try them out
and advise.

If it won't, you may want to set the Label Height to zero and / or move the
Label Top away so that it will not be on the same horizontal line with the
Other Control(s) and try it out.
 
hey I normally do the try and error thing but no I haven't set up the report
yet that's why I was trying to get the info from someone here to set it up
accordingly to what I could do with the can shrink property
 
Can't you just click on the report field to bring up the property window,
then select "Can Shrink"?

PAOLO said:
So how if I design a report which has labels describing each field and I
want to make invisible the ones that don't have anything typed in (by saying
invisible I mean like can shrink where you can't even see on the report
there was another field set up) is it possible to write a VBA code like

If (IsNull([fieldname])) Then
[labelname]???? canshrink
End If

Something similar to this?

Thanks for your help


Arvin Meyer said:
No, You cannot have anything else visible on the same line.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access

report
 
Sorry, didn't read far enough. If you shrink the text box and hide the label
it still uses the space. You would have a blank spot on the report.

PAOLO said:
So how if I design a report which has labels describing each field and I
want to make invisible the ones that don't have anything typed in (by saying
invisible I mean like can shrink where you can't even see on the report
there was another field set up) is it possible to write a VBA code like

If (IsNull([fieldname])) Then
[labelname]???? canshrink
End If

Something similar to this?

Thanks for your help


Arvin Meyer said:
No, You cannot have anything else visible on the same line.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access

report
 

Ask a Question

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.

Ask a Question

Similar Threads

Shrink the length of a field 3
Can Shrink 23
Can Grow, Can Shrink on a Form 3
Can Shrink 1
Report Shrink 1
Report Fields that Auto Shrink/Grow 7
Memo field problem 7
Report columns that Can Shrink 2

Back
Top