WITH THISFORM IF CHR( m.nKeyCode ) = " " && user entered space IF .lLastWasSpace .nTrailingSpaces = .nTrailingSpaces + 1 && found consecutive spaces, count this one ELSE .nTrailingSpaces = 1 && found a space after a non-space, count and reest flag .lLastWasSpace = .T. ENDIF ELSE && not a space - forget counting .lLastWasSpace = .F. ENDIF ENDWITH In Valid: ** get characters actually typed, including trailing spaces .cCharsEntered = RTRIM( This.Value ) IF .lLastWasSpace && last printable character user typed was a space .cCharsEntered = .cCharsEntered + SPACE( .nTrailingSpaces ) && put spaces back ENDIFThanks for your interest and input...it's great to have a place like this to help work through things....J