Alinging text within a text box

stevo

Registered User.
Local time
Today, 10:49
Joined
Feb 16, 2010
Messages
10
Can anyone please help.

I am adding string fields together in a report text box. How can I get consistent spaces between them, is there maybe some sort of tab command. I have tried the following, but I still get uneven spaces depending on the length of the first field.

=[Pnum_1]+Space$(25-Len([Pnum_1]))+ [Pnum_2]
 
Problem is to do with propotional spacing and the font used. In order to get it as you want you will need to use a font such as Courier new (equal sized character widths)
 
Thanks for your reply david, however I tried using courier and I still find that alignment dependson the length of the first field.
 
Uneven spacing being number of spaces or visually? Check that the text box isn't Justified or set to Distribute. This is a Text Align property.
 
if you are using courier, then you also need to ensure that each field is set to occupy the same character count, by padding, or adding suitable spaces.

its tricky

you may even be able to achieve this by prefilling a string with spaces to a given length, and then manipulating this string

but string manipulation of this kind is still a little tricky, because with vba its not that easy to insert a substring into a particular location in a string.
 

Users who are viewing this thread

Back
Top Bottom