ellipsis on a report

D

D. Green

Hi everyone, in some of my report fields, the words count is very long. What
VB codes can I use to show an ellipsis where a word might be cut at the end
of the control? Expanding the control is not best for all locations.
 
L

Larry Linson

D. Green said:
Hi everyone, in some of my report fields, the words count is very long. What
VB codes can I use to show an ellipsis where a word might be cut at the end
of the control? Expanding the control is not best for all locations.

It's trivial to add the three dots, code similar to:

strO = strI & " . . ."

But the trick is going to be extracting the substring strI from your
original based on the size of the control. This involves "font metrics"
calculations against the size of the text box and it is definitely
non-trivial -- so non-trivial that very few developers go to that length.

Larry Linson
Microsoft Access MVP
 
Top