>I have a serial number field that I need to set up so that a user can only enter the sn in with the format 9999999-99 (up to 7 numbers, a dash, up to two numbers). It is possible for the user to enter in less than 7 chars, in which case I will need to pad zeros on the front. I don't really want an inputmask to show for the user, I just want it to convert it after they hit the OK button. Is there a way to do this?
You could use the PADL() function in the Valid or LostFocus event of the textbox:
THIS.Value = PADL(ALLTRIM(THIS.Value), 9, "0")
Sylvain Demers