Using the STRING Function
In this tutorial you will learn how to use the String Function.
The String function returns a character repeated a given number of times.
=String( Number As Long, Character )
Number Amout of characters you want to add
Character value you wish to add
In this example we will use the Underscore ("_") character to add to a string.
We wish to add it 4 times.
The result is "____".
The results using a Query would be
SELECT STRING(4, "_");
In a Form you could set the Default Value of a Textbox to
In a Form add a TEXTBOX control and rename it "txtStrComp", then you could add the following in the Load Event.
Private Sub Form_Load()
txtSTRING = STRING(4, "_")
Access Expert 25
You can find more about this by searching the website.
By: Alex Hedley
Click here to sign up for more FREE tips