Fill 'empy' part of text control with stars*****

Happy YN

Registered User.
Local time
Today, 23:53
Joined
Jan 27, 2002
Messages
425
Fill 'empty' part of text control with stars*****

I would like the remaining part of my text control to show stars
e.g control value is 12
it shows *************12
control value is 3567890
it shows *********3567890

My text control does not have a fixed width, this is set in code depending on various factors
Thanks
 
Last edited:
Happy,

Do you want the "*" in the data, or just displayed?

If you want it in the data, just use the AfterUpdate event to Pad it
with "*".

Me.MyField = String(20 - Len(MyField), "*") & Me.MyField

If you don't want to store the "*", then you'll probably have to use an
unbound control and add a line of code to update the invisible "real" data:

Me.BoundControl = Right(Me.MyField), Len(Me.MyField) - InStrRev(Me.MyField, "*"))

Wayne
 

Users who are viewing this thread

Back
Top Bottom