Input masks for a field with varying data lengths/values

G

Guest

Hi,

I have a database which logs tape movements between sites. I have a field
in a table called TapeID, I need to specify an input mask for this field so
that the value cannot be longer or shorter than a certain length.

My problem lies with the fact that the TapeID can be anything from 7 to 10
characters in length and each field can have a different tapeid (ie,
DTAWHWK03a or 030001). Ideally I would like to specify an input mask which
not only limits the field length, but also specifys that the prefix
characters must be a letters followed by numbers or vice versa).

Here are the prefix values required for the field;

BFG
ICEPERM
BFGWK
MD
01
03
RUNBDC02_
PRPRIM0
SDWEEK
SDRS
SDRS
SDRUG
SAVSYS
SDZEUS
ZEUSWK

Is there any way I can do this without having to create seperate tapes for
each TapeID.

Thanks
 
T

Tim Ferguson

Ideally I would like to specify an input mask which
not only limits the field length, but also specifys that the prefix
characters must be a letters followed by numbers or vice versa

Quite apart from the fact that I hate input masks almost as much as
syphilis, I think that this is too big a job for IMs.

I would use the BeforeUpdate event for the text box on the form to validate
properly, using a suitable combination of Len() functions and Like
operators, or the RegExp object, etc.

Hope that helps


Tim F
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top