Formatting a field

W

Walter Steadman

Not sure where I am messing up on this one. have tried in Format and Input
Mask.

I have my Primary Key called PilotID (it is a text field) I need the input
to be two letters followed by 4 numbers, example: WS8128
I want to force the users to use that format (for the most part they will,
but someone could try to input S8128 and I don't want that). Do I set this
up in the format of the field in Table Design View?

Thanks in Advance.
 
T

Tim Ferguson

I have my Primary Key called PilotID (it is a text field) I need the
input to be two letters followed by 4 numbers, example: WS8128
I want to force the users to use that format

It depends...

If the WS is constant, then just don't store it at all: store the number in
a Long or Integer field and use a Format to make the WS appear in forms,
reports and queries etc.

If the WS is variable and significant, then it needs its own field separate
from the number (1st normal form = 1 field, 1 datum, right?). You make it
look right on reports and queries etc by concatenating them into a single
string. If it's an identifier that you want to use as a Primary Key, then
you can still create a PK using both fields.

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