Random number of characters either side of Literal Characters

  • Thread starter Thread starter Tim Locken
  • Start date Start date
T

Tim Locken

I wish to create an input mask that will allow a random number of
characters before and after or between mandatory characters

Example 1. To force the use of XoX followed by 1 or more
characters should allow:
XoXa
XoXbcde
XoX5qr7
XXL have fun today

Example 2. To force the use of 1 or more characters before XoX
should allow:

3XoX
asdf4XoX
37 abc XoX

Example 3. To force the use of 1 or more characters between YYY
and HHH should allow:

YYY7589HHH
YYYabcd 123 HHH
YYY between HHH

Example 3. To force the use of 1 or more characters before after
and between YYY and HHH should allow:

67abcYYYrossHHHsold
 
Sorry,I may have asked the question incorrectly. I have just had a
read of the help file for input masks and note that 'the Literal
Values' of the mask will be displayed as typed in the mask. So that
means that I realy want to define that as a user I will be required to
enter 1 or more characters at each place holder. So, how do I define
a random number of characters for each place holder.

With Thanks,
Tim Locken
 
I wish to create an input mask that will allow a random number of
characters before and after or between mandatory characters

AFAIK, you can't. Masks are of limited utility!

You may need to write VBA code in the BeforeUpdate event of the form control
in which these values are entered to check for proper structure.

John W. Vinson [MVP]
 
Back
Top