More line control questions

  • Thread starter Thread starter Bill Stanton
  • Start date Start date
B

Bill Stanton

What's the generally accepted method for
suppressing a line when a record field is
blank. E.g., where either of fields strAddr1
or strAddr2 are blank, don't print a blank
line and suppress the line-feed.

Note that there are TWO text-box controls
used here. Is it better to write a function
that tests for a blank field, then return
a string to a "single" text-box control's
recordsource that contains line-feed
controls between the two fields?

Thanks,
Bill
 
Bill said:
What's the generally accepted method for
suppressing a line when a record field is
blank. E.g., where either of fields strAddr1
or strAddr2 are blank, don't print a blank
line and suppress the line-feed.

Note that there are TWO text-box controls
used here. Is it better to write a function
that tests for a blank field, then return
a string to a "single" text-box control's
recordsource that contains line-feed
controls between the two fields?

The usual approach is the set the text box's CanShrink
property to No. You might also want to set the section's
property too.
 
Access cannot shrink a control when there are other controls parallel to -
i.e. to the left or to the right of it in the same section.
That is just a limitation you will have to live with.

You would be better off concatenating the two address fields.

HS

Bill Stanton said:
Messing with the "CanShrink" was the first thing
I tried, but it didn't matter whether I set it to YES
or NO. The report detail section consists of an
image frame that spans the entire height of the
section with text-boxes alongside of the image.
That would mean, of course, that Access would
necessarily grow and shrink the lines alongside
of the image independent of and without altering
the size of the image, a feat I would think is
commonplace in Access.

So, with the text-box and detail section's CanShrink
properties set to NO, blank lines continue to display
whenever the recordsource field is "".

Bill
 
How about putting all the text-boxes inside
a frame. Would Access handle the formatting
inside the frame independent to the adjacent
controls?
Bill



HSalim said:
Access cannot shrink a control when there are other controls parallel to -
i.e. to the left or to the right of it in the same section.
That is just a limitation you will have to live with.

You would be better off concatenating the two address fields.

HS
 
Bill said:
Messing with the "CanShrink" was the first thing
I tried, but it didn't matter whether I set it to YES
or NO.

Well, that was a typo, it should be CanShrin set to YES.

The report detail section consists of an
image frame that spans the entire height of the
section with text-boxes alongside of the image.
That would mean, of course, that Access would
necessarily grow and shrink the lines alongside
of the image independent of and without altering
the size of the image, a feat I would think is
commonplace in Access.

You already came up with the right idea in a later post.
Use a single text box with an expression like:

=fullname & (Chr(13) + Chr(10) + address1) &
(Chr(13) + Chr(10) + address2)
 
Back
Top