By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,841 Members | 1,736 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,841 IT Pros & Developers. It's quick & easy.

trim() works differently on forms and reports?

P: n/a
I used the labal wizard to create a report to print mailing labels. When I
did, access uses the trim() function for each of the text fields. My labels
contain 4 lines... name, name2, address, citystatezip. The way that access
set up the report (using trim() I presume) if there is no data in the name2
fields, access eliminates the space where it would go rather than leaving a
blank line. I was unaware of this function but quickly put it to use on a
number of my reports. I then tried it on a form. The form simply displays
the same info as the mailing list. It, however does not display the same
way. If name2 is blank, access shows a blank line. I saved the form as a
report and the blank line dissapears again. Am I making a correct assumption
that the trim() function either a) does not work the same way on a form as
it does in a report, or b)there is something else about that label wizard
report that causes it to perform the way it does?
Oct 7 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Jimmy Stewart wrote:
I used the labal wizard to create a report to print mailing labels.
When I did, access uses the trim() function for each of the text
fields. My labels contain 4 lines... name, name2, address,
citystatezip. The way that access set up the report (using trim() I
presume) if there is no data in the name2 fields, access eliminates
the space where it would go rather than leaving a blank line. I was
unaware of this function but quickly put it to use on a number of my
reports. I then tried it on a form. The form simply displays the same
info as the mailing list. It, however does not display the same way.
If name2 is blank, access shows a blank line. I saved the form as a
report and the blank line dissapears again. Am I making a correct
assumption that the trim() function either a) does not work the same
way on a form as it does in a report, or b)there is something else
about that label wizard report that causes it to perform the way it
does?
What you are seeing on the report is not Trim(). It is the capability of
controls on reports to shrink and grow vertically. Shrinking in this case means
to disappear entirely when the field value is null.

Control on forms also have these properties but they only pertain to printing
the form, not to on-screen usage.
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Oct 7 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.