Input Mask Display

  • Thread starter Thread starter Francesca
  • Start date Start date
F

Francesca

Do you know if we can change the Input Mask's message
displayed to the User. I have an input mask of LL00000
and this is being displayed when the user doesn't enter
the correct information in the field on the form.
 
No. This is a built in error message. However, if you use the validation
method we discussed before, you can have it display any mesasge you want.
Is that not acceptable?

Kelvin
 
No, I really like the code you gave me and it works great
but know I've sort of run into another problem..

I have set up the Before Event to validate my data when
the record is saved but when I enter a Input Mask of
\B\C00000 for the Asset_Num field
and the user enters the 5 numbers which is correct the
Msgbox from the Before Event is being displayed when it
shouldn't be and won't allow me to save. When I chang the
Input Mask to LL00000 I don't get that message and it lets
me save the record. This is ok and I will leave it at
that if there is no other resolution but when you don't
enter all of the five characters I just don't like that it
tells the user "Entry must contain an input mask of
LL00000 instead of BC00000 because it is not very
descriptive.. But without the Input Mask and with only the
defalut value set to "BC" the validation allows the user
to enter uncapitalized letters and I don't want to allow
this in my database...

Any help would be appreciated...

Thanks again...
 
Yes, this is very acceptable and it works great...I seem
to be having another problem though not crucial but maybe
you would know why..

I have set up the Before Event
to validate my data when the record is saved but when I
enter an Input Mask of \B\C00000 in the Asset_Num field
and the user enters the 5 numbers which is correct the
Msgbox from the Before Event is being displayed when you
try to save the record and it
shouldn't be cause it meets the validation. It may be
another glitch but when I change the Input Mask to LL00000
I don't get that message and it lets me save the record.
Also, I have the Default Value set to "BC". I can have
only the default set with no input mask but then how do I
enforce that only capital letters be entered in the field..

Thanks again for any help..
 
The mask "LL00000" forces the person to type in 2 characters first. These 2
characters automatically get stored with the number since they were manually
typed in. So the code will see "BC?????". If you want to force capital
letter try ">LL00000". the ">" converts everything to an uppercase.

The input mask of "\B\C00000" says to show the letters BC and allow the user
to enter 5 numbers. This will only save the 5 numbers that are entered so
while the code is looking for "BC?????", the actual number that was entered
and stored is "?????" without the BC. So the validation is wrong. You can
change the code to only look for the numbers. Or change the input mask to
"\B\C00000;1" which will store BC along with the number. Then the current
code should work.

Kelvin
 
Back
Top