Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Input Mask

Status
Not open for further replies.

JSD

Technical User
Jan 18, 2002
189
US
Hello,

I was wondering if someone can help me with an input mask for a particular field. The values to be entered in this field should be restricted to numbers only, and it will either be a four digit number or a four digit number, a dash, and a two digit number.

ex -- "1000"
"1000-10"
"2100"
"3000-10"

Any ideas are much appreciated as always.

Thanks

Jeremy
 
Hi,

It's necessary to make a field in design view of table with @Text@ Data type and write this sentence in input mask field :
>0000\-00;0;_

I hope to be usefull to you and let me know if is ok

Ali Fekri
 
Hello Fekri,

Thanks for your time and knowledge. The statement you showed me works for numbers like "1000-10", but not for numbers like "1000." Almost there...any further suggestions?

Thanks

Jeremy
 
how about setting up two fields. im presuming these are reference numbers or something and therefore you wont be calculating anything with them.

so could you set up 2 fields, one as number the other as extension
so you could enter 1000 then the extension box would contain the -10

this could be tidied in forms by hiding the number and extension fields and just having a control that is number + extension (i believe with text fields it combines rather that adding therefore 2 + 1 would become 21)

i know its a bit messy, but then again my solutions always are.
 
Hi,

On last Mask you can replace "-" to ".",

So, it means you should write:

>0000\.00;0;_

will be ok...

good luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top