ArcticWolf said:
Hi,
Setting the manimum is simple enough but is there a way to set a
minimum length please?
TIA,
AW
It's not clear to me whether you want to set the starting width of the
unfilled field (by default it's five nonbreaking spaces, but you can set the
default text to more by typing Ctrl+Shift+space characters in the Properties
dialog), or whether you want to check the user's entry to be sure it's at
least a minimum number of characters.
If it's the latter, see
http://www.gmayor.com/formfieldmacros.htm. The
modification you need is in the AOnExit() procedure: change the line
If Len(.Result) = 0 Then
by replacing the = 0 with < n where n is the minimum number of characters.
For instance, to require at least 5 characters, make the line
If Len(.Result) < 5 Then
You'll also want to change the message on the following line.
--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.