Spacing Issue (filling textbox with ".....")

karmahum

Registered User.
Local time
Today, 08:47
Joined
Apr 29, 2002
Messages
53
Hello.

I tried to find a solution to this problem, but really couldn't even think of a way to search.

Basically, I am filling a number of textboxes in a report dynamically when the report is opened. Based on the length of the text in the box, I want to fill the remainer of the textbox with ".....".

Any ideas?

Thanks!
 
Something along these lines should do it. The figure of 10 was used as an example; you can alter this to the length you wish.

Code:
Dim i as Integer, intLength as Integer

intLength = Len(txtInformation)

If intLength<10 Then
   For i = 1 To 10 - intLength
      txtInformation = txtInformation & "."
   Next i
End If
 
Or . . .

Code:
Dim intLength as Integer

intLength = Len(txtInformation)

txtInformation = txtInformation & String(10 - intLength, ".")
 

Users who are viewing this thread

Back
Top Bottom