More the one input mask on a field

Rusty

Registered User.
Local time
Today, 12:18
Joined
Apr 15, 2004
Messages
207
Hey Guys,

Long story on this but I need a reference number field to be limited to either 6 or 7 characters. Any ideas how to implement 2 input masks on a single field.

Obviously all I have at the moment is "000000" in the Input Mask section but not sure how to put a second one in there.

Any help would be gratefully received.

Cheers,

Rusty
:D
 
A posible workaround that I use, would be to use the "after update" event, and check the field using vba.

At least a suggestion.
 
You should really use the BeforeUpdate Event for field validation. You then simply set Cancel = True if you do not like the input and hold the focus in the control.
 
Thanks guys :D

I work a lot in VBA, but how do I check the field using vba?

Rusty
:D
 
I personally dislike input masks. Why not tell us the field requirements and we'll come up with the BeforeUpdate code for you. You could use the ControlTip Text to let the user know how to complete the field properly.
 
Cheers dude.

The field is a text field that needs to have either a 6 or 7 digit numerical value put in it.

(The reason it's a text field even though there's a number going in there is that some of them start with a 0, i.e. "012345")

Hope that makes sense.

Rusty
:D
 
"9000000" as a mask would probably be the easiest. "9" says numeric but optional while "0" is numeric but manditory.
 
Cheers dude.

I went with "0000009" as it's the last digit that's optional.

Many thanks you guys for all your help.

Rusty
:D
 

Users who are viewing this thread

Back
Top Bottom