By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,987 Members | 1,592 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,987 IT Pros & Developers. It's quick & easy.

add dummy character

P: n/a
I have a field with 8 char how can add via code the rest of character (_),
if i insert 4 or 2 or 3 characters.

Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Suppose you have a control on the form, bound to this field. The control
is called ctlInput.

Create an Exit procedure for the control (properties, tab Events, select
[Event Procedure] at On Exit)

Write this in the procedure body:

ctlInput = left(ctlinput & String(8,"_"),8)

This will first append 8 underscores to whatever was entered, and then
take the first 8 characters. Whatever was entered, is now 8 characters
long, and if the input was less, the rest will be your underscores.

Parintas Themis STE Kardias wrote:
I have a field with 8 char how can add via code the rest of character (_),
if i insert 4 or 2 or 3 characters.


--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.