Character Spacing

P

PC User

I've imported a graphics scan of a regulatory agency's form into a
report and I've placed fields over places on the form to make it look
like the information was typed into it. My question is that in one of
the locations on the form I need to increase spacing between the
characters in the text field there. The form has small rectangles
side by side where each rectangle is supposed to have only one
character and together all the characters in these adjacent rectangles
can spell a word. Can I adjust character spacing, or do I have to
partition the text in small text fields in each of the rectangle. Any
ideas?

Thanks,
PC
 
P

PC User

I found an answer and I thought I'd share it.

SPACING FOR TEXT FIELDS

Assumptions:

1. Using a report.
2. Field FirstName (with "John Smith")
3. Text field is in the Detail section of the report

Solution:

Add an unbound text control to the detail section and call it
SpacedText (you can hide
the real FirstName field)
Using the Detail Section OnFormat event...

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim Ctr As Integer, LengthOfText As Integer
Dim BuildStr As String
LengthOfText = Len(FirstName)
For Ctr = 1 To LengthOfText
BuildStr = BuildStr & Mid(FirstName, Ctr, 1) & " "
Next Ctr
SpacedText = BuildStr
End Sub


SPACING FOR NUMERIC FIELDS

Assuming 1235 is a number field,

In the format property of the textbox use the # character to adjust
the spacing.

Example of a spacing format: # # # # # # # #
So that a dsiplay 1235 becomes 1 2 3 5.
Make the length of the FOrmat long enough to hold your largest number.
 

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