Configuring a field to allow two formats of data only.

  • Thread starter Thread starter Darren K via AccessMonster.com
  • Start date Start date
D

Darren K via AccessMonster.com

Hi I would like to configure of the fields (the primary key ) to allow two
unique formats of entry. These formats are:

1. A number which could range from 3 - 6 characters in length
2. Or a string in this format NUHT1234 (basically NUHT and four numbers)

This is for our asset tags which protect our company PC's but the latter is
the new format. So our database needs to be configured to allow both formats
of entry old and new. It is currently set to just long integer but I would
like this field to restrict to a number of up to six characters or the
NUHTxxxx format. Can this be set? If so how can I do this?

Thanks in advance for your assistance.
 
If all of the (latter) will consist of a static string ("NUHT") plus some
digits, why bother storing the NUHT portion? It sounds more like a
format-for-display issue than a data storage issue.

Is there some way, other than the ID field, that you can use to tell the new
records from the old? If not, then consider using a Text-type data field.
I'm assuming that any digits you use, in either format, are just characters,
and not numbers (i.e., you will never sum up the ID numbers for a total ID
number).

Regards

Jeff Boyce
<Access MVP>
 
Back
Top