Breaking Up Text (Numbers)

  • Thread starter Thread starter DubboPete
  • Start date Start date
D

DubboPete

Hi all,

I'm a bit stuck with this one... I have a field in which I type three
sets of numbers in the format 43601-078-00038, and the input mask I use
defies logic - but works!

The input mask is:

9999&"-"&9&"-"&99999

Trust me, it works. But the end result I am trying to achieve is an
entry in the table that reflects the hyphens used. Presently the
number is stored as 4360107800038. I just want it stored in (text
field within) the table as 43601-078-00038.

it's stored as text because there is sometimes an instance of
43601-abc-00038 too.

Any help appreciated

DubboPete
 
Hi Pete

If you add ;1 to the input mask then the "extra" characters in the mask will
be stored along with what the user typed in.
 
According to A2K help, (for the second section of the Inputmask property)

"If you use 0 for this section, all literal display characters (for example,
the parentheses in a phone number input mask) are stored with the value; if you
enter 1 or leave this section blank, only characters typed into the control are
stored."


So the input mask should be "AAAAA\-AAA\-AAAAA;0" (without the quotes)

Using this mask, you won't have to type in the hyphens, but they will be stored
with the entry.

If all places are required to be entered and can be letters or numbers, use
"A". Letters will be the case that you entered them (lower case or upper case)

If only the three middle places can be letters, use

"00000\-AAA\-00000;0" (without the quotes)


Check help for Inputmask property" for more options.

HTH
 
Hi Steve

Quite right! My failing memory told me it was the other way around.

Moral of the story: if you never use a feature yourself, always look it up
in the help before shooting your mouth off :-)

Thanks for the heads-up.
 
Back
Top