Help

S

stephenrussett

Ok so i need to be able to write a letter along side a number in the
promary Key,

Example:

Primary key numbers:

0095
0100
0101
0102
0103

What i need to do it be able to add:

0100
0100A
0100B
0101
0102

The field that the primary key is in needs to be a numbers field
because there are many linked excel files and queries that require it
to be a number.

Is there a way i can do this?

Thanks
 
J

Jerry Whittle

You can certainly display a letter next to your primary key in a query, form,
or report (but not table) IF you can determine when to do so. What makes the
100A or 100B in your example below?
 
J

John Vinson

Ok so i need to be able to write a letter along side a number in the
promary Key,

Example:

Primary key numbers:

0095
0100
0101
0102
0103

What i need to do it be able to add:

0100
0100A
0100B
0101
0102

The field that the primary key is in needs to be a numbers field
because there are many linked excel files and queries that require it
to be a number.

Is there a way i can do this?

Number fields cannot contain letters... period.

What you can do is to add a second field to the table, Text datatype.
Your primary key should then be a two-field key containing both the
number (which isn't unique by itself) and the letter (likewise).

You'll need to set the text field to Required = Yes, Allow Zero Length
Strings = Yes, Default = "" since you cannot include a NULL in a
primary key.

John W. Vinson[MVP]
 

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