Thanks for finishing the job, Mike. You're a good helper
![[wink] [wink] [wink]](/data/assets/smilies/wink.gif)
.
Of course you also need to change the field name for the LEN(field) part to work, or insert the number of X you want. You don't need the code at all, if you manually set the Inputmask, of course. Len(field) is possible for char fields only. With Memo or Varchar fields you get variable length, but Memos and textboxes don't go well anyway.
It would be more generic to use Len(Eval(This.ControlSource)) instead of Len(field), which depends on the controlsource, of course. Just ensure the table is open, when you evaluate the field length. FISZE() is another possibility, but I circumvent it, as it can mean file size or field size, depending on COMPATIBLE mode ON or OFF.
Also you could combine U and W as in U
which does upper the first letter and lowers all others, it also only allows letters as input. You'd have to check if that includes spaces at least, otherwise that might be too restrictive.
Bye, Olaf.