Placeholding Zero

bob bisquick

Registered User.
Local time
Today, 14:44
Joined
Nov 8, 2002
Messages
37
OK, so I have to combine two tables with the same information (customers), but the primary keys are totally different. So, I combine the tables, and then I am trying to generate a new set of primary keys. The PK is 03054446100000 then two digits starting with 01 and then consective:

Example:

0305444610000001
0305444610000002

you get the idea. So, I created a table where in the first field every record is 03054446100000 and the second field is an autonumber field 1, 2, 3, etc... and I can format that field so it reads 01, 02, 03, etc... and I can combine those two fields in a query using &:

[PK] & [Auto Number]

But then I lose the leading Zero on numbers under 10, and now the first nine instances of my Primary Key are 1 digit too short. Any suggestions on how to fix this?
 
You can't use leading zero's for numeric datatype fields.

This question has been asked several times before.
So, for more info and possible solutions, search this forum for "leading zero".

RV
 
It Works!

Pat -

Thanks for your suggestion, it worked. Yes, it would be a problem if I had more than 99, but this could be solved by using Format(YouFieldB, "000") or more zeros, anyway.

Thanks for the tip.
 

Users who are viewing this thread

Back
Top Bottom