Random number of characters either side of Literal Characters

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
 
T

Tim Locken

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
 
J

John W. Vinson

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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top