Field size in reports

S

setabery

I have seen printed reports where the field size on the report does
not have enough space to print the value in the field. The first part
of the value in the field is printed and then an ellipis (...) is
inserted indicating that there is more but not enough room to print
it. Can this be done in Access and if so, how?
 
T

Tom Lake

I have seen printed reports where the field size on the report does
not have enough space to print the value in the field. The first part
of the value in the field is printed and then an ellipis (...) is
inserted indicating that there is more but not enough room to print
it. Can this be done in Access and if so, how?

Determine the max characters you'd like to show and call that number M
(I use the dummy name Myfield. Replace that with your own field name)

Make the source of the text box be this:

=IIf(Len([Myfield]) > M, Left([Myfield], Len([Myfield]) - M - 5) & "(...)",
[Myfield])

Tom Lake
 
M

Marshall Barton

I have seen printed reports where the field size on the report does
not have enough space to print the value in the field. The first part
of the value in the field is printed and then an ellipis (...) is
inserted indicating that there is more but not enough room to print
it. Can this be done in Access and if so, how?


Not sure what you're talking about, but if you are using a
text box control to display the value, then just open the
report in design view and change the text box's Width to
whatever size you want.
 
M

Marshall Barton

Gee, that makes a lot more sense than how I read the
question.

Note that proportional fonts can make the Len function near
useless when a close fit is needed. For a more precise
measurement of the length of a formatted text string, use
the TextWidthHeight function at www.lebans.com
--
Marsh
MVP [MS Access]


Tom said:
I have seen printed reports where the field size on the report does
not have enough space to print the value in the field. The first part
of the value in the field is printed and then an ellipis (...) is
inserted indicating that there is more but not enough room to print
it. Can this be done in Access and if so, how?

Determine the max characters you'd like to show and call that number M
(I use the dummy name Myfield. Replace that with your own field name)

Make the source of the text box be this:

=IIf(Len([Myfield]) > M, Left([Myfield], Len([Myfield]) - M - 5) & "(...)",
[Myfield])
 

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