creating a unique autonumber code

Vic

New Member
Joined
Mar 26, 2003
Messages
3
creating a unique autonumber code

I would appreciate if a suggestion could be given to create a unique code to be used as an identification code: I do not want to use the autonumber of Access.

Prerably a creative combination
YP_sector refers to yellowpage sector
YP_code refers to yellowpage code

Below is an indication of the data used, typically composed of:

YP_Sector Company

Bobine 3 P Rappresentanza Commercio Estero (S.R.L.)
Bobine 3 P Rappresentanza Commercio Estero (S.R.L.)
Bobine 3 P Rappresentanze Commercio Estero Srl
Abbigliamento gestanti e neonati 44 Gatti Di Scandroglio Marta Alziati D. Snc
Cravatte sciarpe e foulards 5 Seta Srl
Abbigliamento uomo - produzione e ingrosso 900 Uomo (S.R.L.)
Abbigliamento uomo - produzione e ingrosso 900 Uomo Srl
Pelletterie - produzione e ingrosso A & C. Sas
Biancheria intima ed abbigliamento intimo - produzione e ingrosso A Fior Di Pelle
Biancheria intima ed abbigliamento intimo - produzione e ingrosso A Fior Di Pelle
Biancheria intima ed abbigliamento intimo - produzione e ingrosso A Fior Di Pelle Di Reginato Sonia
Busti corsetti e reggiseni A Fior Di Pelle Di Reginato Sonia

YP_Co Company Comp Type Address Post_Code Province Prov Tel


008683 3 P Rappresentanza Commercio Estero Srl Srl Via Residenza Mestieri Mi 2 20090 Segrate MI 022640905
008177 3 P Rappresentanza Commercio Estero Srl Srl Via Residenza Mestieri Mi 2 20090 Segrate MI 022640910
007671 3 P Rappresentanze Commercio Estero Srl Srl 18 Res. Mestieri - Mi 2 20090 Segrate MI 022640905
007165 44 Gatti Di Scandroglio Marta Alziati D Snc Snc Via Merelli Raffaele 3 20052 Monza MI 039322738
006659 5 Seta Srl Srl 6 V. Giovanni Verga 22070 Montano Lucino CO 031470884
006153 900 Uomo Srl Srl Via Lodovico Venturoli 24/B 25080 Mazzano BS 0302122493
010111 900 Uomo Srl Srl Via Eridano 4 26100 Cremona CR 0372410834
010510 A C Sas Sas 41 V. M. D'Agrate 20139 Milano MI 0257401040
010201 A Fior Di Pelle Via Cesare Battisti 13 21040 Jerago Con Orago VA 0331217030
010201 A Fior Di Pelle Via Cesare Battisti 13 21040 Jerago Con Orago VA 0331219778
010201 A Fior Di Pelle Di Reginato Sonia 13 C. Battisti 21040 Jerago Con Orago VA 0331217030
010203 A Fior Di Pelle Di Reginato Sonia 13 C. Battisti 21040 Jerago Con Orago VA 0331217030
010117 Ab Di Cesana Mario C Snc Snc 14 V. Don Mattavelli 20048 Carate Brianza MI 0362903460
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
You can use the Dmax() funtion to create autonumbering systems but you need to give more detail of what you need and why not Autonumbers


Peter
 
Upvote 0
Use an autonumber but create a seperate field for the code. Index it to have Yes (No Duplicates).
 
Upvote 0
Does this mean I have to set two primary keys?

autonumber (primary key)
internal_code (primary key) - plus designate as YES (no duplicates)
 
Upvote 0
No, because you can only have one primary key per table.

It just means that the autonumber remains your primary key and is not see by the user. The internal code can be the visible field: not primary; just indexed.
 
Upvote 0

Forum statistics

Threads
1,221,783
Messages
6,161,938
Members
451,730
Latest member
BudgetGirl

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top