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?
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?