Input mask problem

Smee

Registered User.
Local time
Today, 03:23
Joined
Dec 16, 2003
Messages
69
Hey Everybody

I have imported tables from a foxpro database (as readers of my other problems will be well aware).

Part of the problem with the imported data is the jobno field.

The jobno is either 4 digits - like a pin number. i.e. 5678 etc.

or is 4 digits "-" 2 digits to indicate a subjob. i.e. 5678-21 etc

However, I need to make sure no other formats slip through. For example. I found a jobno entry of 3788#

I tried to make an input mask for this, but that means I need an 'or'

eg 0000 or 0000\-00

It doesn't seem to allow this. Another option is to make the "\-00" part optional; but I don't know how to.

Help greatly appreiciated.

Thanks
 
Thanks for that ByteMyzer.

It is definately an improvement. However if the job doesn't have the subjob digits, then I don't want the hyphen either.

so it is 5678

or 5678-56

not 5678-

It was the hyphen I didn't know how to make optional - sorry I should have explained better.

Any ideas - or is this not possible as an input mask?
 
Smee said:
Thanks for that ByteMyzer.

It is definately an improvement. However if the job doesn't have the subjob digits, then I don't want the hyphen either.

so it is 5678

or 5678-56

not 5678-

It was the hyphen I didn't know how to make optional - sorry I should have explained better.

Any ideas - or is this not possible as an input mask?

you could use VB with an IF loop to capture the input and set the mask accordingly. Be sure to include an error routine so that anyone doing it wrong will get their wrist slapped. :D
 
Thanks Parker, I'll have a play. :D
 

Users who are viewing this thread

Back
Top Bottom