More line control questions

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
 
M

Marshall Barton

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.
 
H

HSalim

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
 
B

Bill Stanton

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
 
M

Marshall Barton

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)
 

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

Top