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