Connecting Tech Pros Worldwide Forums | Help | Site Map

Custom Autonumber

turtle
Guest
 
Posts: n/a
#1: Sep 3 '08
I posted this a month or two back but am still looking for a good
solution...tia

I need to know if the following is possible. I have a vague idea how
to get started on the first part of this but completely lost on teh
exception:

We need to create a database program that issues MAC addresses
sequentially (with one exception).
The database should accept the following information:


Product Type: (e.g. G4C, G4B, G4P, CCP, …)
Product Serial Number:
Requester Name:


If the serial number has already been given MAC addresses then the
previous serial #’s MAC addresses should be re-issued. If not then
new numbers should be generated. The number of MAC addresses
generated will be dependent on the product type. For example, a G4C
needs three MAC addresses and a G4B needs one address. MAC
addresses
should start at 0040c0 000000 and be issued sequentially.


The only exception is the G4C which needs to be at addresses 0040c0
xx60xx, 0040c0 xx80xx and 0040c0 xx90xx for its three interfaces
respectively. This gives 65536 unique addresses which is more than
enough. So the three addresses for the first G4C should be 0040c0
006000, 0040c0008000, and 0040c0 009000.


Is this possible using a combination of code and autonumber?


thanks,
KO



paii, Ron
Guest
 
Posts: n/a
#2: Sep 3 '08

re: Custom Autonumber



"turtle" <kolsby@vistacontrols.comwrote in message
news:8316b55e-2987-4c1c-a835-bc9d26c0e096@e53g2000hsa.googlegroups.com...
I posted this a month or two back but am still looking for a good
solution...tia

I need to know if the following is possible. I have a vague idea how
to get started on the first part of this but completely lost on teh
exception:

We need to create a database program that issues MAC addresses
sequentially (with one exception).
The database should accept the following information:


Product Type: (e.g. G4C, G4B, G4P, CCP, …)
Product Serial Number:
Requester Name:


If the serial number has already been given MAC addresses then the
previous serial #’s MAC addresses should be re-issued. If not then
new numbers should be generated. The number of MAC addresses
generated will be dependent on the product type. For example, a G4C
needs three MAC addresses and a G4B needs one address. MAC
addresses
should start at 0040c0 000000 and be issued sequentially.


The only exception is the G4C which needs to be at addresses 0040c0
xx60xx, 0040c0 xx80xx and 0040c0 xx90xx for its three interfaces
respectively. This gives 65536 unique addresses which is more than
enough. So the three addresses for the first G4C should be 0040c0
006000, 0040c0008000, and 0040c0 009000.


Is this possible using a combination of code and autonumber?


thanks,
KO

Possible with code. Ill-advised with autonumber.


turtle
Guest
 
Posts: n/a
#3: Sep 3 '08

re: Custom Autonumber


On Sep 3, 12:45*pm, "paii, Ron" <n...@no.comwrote:
Quote:
"turtle" <kol...@vistacontrols.comwrote in message
>
news:8316b55e-2987-4c1c-a835-bc9d26c0e096@e53g2000hsa.googlegroups.com...
I posted this a month or two back but am still looking for a good
solution...tia
>
I need to know if the following is possible. *I have a vague idea how
to get started on the first part of this but completely lost on teh
exception:
>
We need to create a database program that issues MAC addresses
sequentially (with one exception).
The database should accept the following information:
>
Product Type: (e.g. G4C, G4B, G4P, CCP, …)
Product Serial Number:
Requester Name:
>
If the serial number has already been given MAC addresses then the
previous serial #’s MAC addresses should be re-issued. * If not then
new numbers should be generated. *The number of MAC addresses
generated will be dependent on the product type. *For example, a G4C
needs three MAC addresses and a G4B needs one address. * MAC
addresses
should start at 0040c0 000000 and be issued sequentially.
>
The only exception is the G4C which needs to be at addresses 0040c0
xx60xx, *0040c0 xx80xx and 0040c0 xx90xx for its three interfaces
respectively. * *This gives 65536 unique addresses which is more than
enough. * So the three addresses for the first G4C should be 0040c0
006000, 0040c0008000, and 0040c0 009000.
>
Is this possible using a combination of code and autonumber?
>
thanks,
KO
>
Possible with code. Ill-advised with autonumber.
Anyway to elaborate? I know it probably isn't an easy answer but any
help pointing me in the right direction would be wonderful.
thanks,
KO
Tom van Stiphout
Guest
 
Posts: n/a
#4: Sep 4 '08

re: Custom Autonumber


On Wed, 3 Sep 2008 13:35:02 -0700 (PDT), turtle
<kolsby@vistacontrols.comwrote:

This is a FAQ:
http://www.mvps.org/access/general/gen0025.htm

Most of us won't take the time to write the code for you, but when
given a specific question you are likely going to get a specific
answer.
You'd probably want to write some code to implement the rules you have
for generating the next number. Then you'd probably want to store the
last-used number (for each series) in a table so you can come back to
it and increment from there.
If you write your code correctly (in a public function in a standard
module) you can also call it from a query if you so choose.

-Tom.
Microsoft Access MVP


Quote:
>On Sep 3, 12:45*pm, "paii, Ron" <n...@no.comwrote:
Quote:
>"turtle" <kol...@vistacontrols.comwrote in message
>>
>news:8316b55e-2987-4c1c-a835-bc9d26c0e096@e53g2000hsa.googlegroups.com...
>I posted this a month or two back but am still looking for a good
>solution...tia
>>
>I need to know if the following is possible. *I have a vague idea how
>to get started on the first part of this but completely lost on teh
>exception:
>>
>We need to create a database program that issues MAC addresses
>sequentially (with one exception).
>The database should accept the following information:
>>
>Product Type: (e.g. G4C, G4B, G4P, CCP, …)
>Product Serial Number:
>Requester Name:
>>
>If the serial number has already been given MAC addresses then the
>previous serial #’s MAC addresses should be re-issued. * If not then
>new numbers should be generated. *The number of MAC addresses
>generated will be dependent on the product type. *For example, a G4C
>needs three MAC addresses and a G4B needs one address. * MAC
>addresses
>should start at 0040c0 000000 and be issued sequentially.
>>
>The only exception is the G4C which needs to be at addresses 0040c0
>xx60xx, *0040c0 xx80xx and 0040c0 xx90xx for its three interfaces
>respectively. * *This gives 65536 unique addresses which is more than
>enough. * So the three addresses for the first G4C should be 0040c0
>006000, 0040c0008000, and 0040c0 009000.
>>
>Is this possible using a combination of code and autonumber?
>>
>thanks,
>KO
>>
>Possible with code. Ill-advised with autonumber.
>
>Anyway to elaborate? I know it probably isn't an easy answer but any
>help pointing me in the right direction would be wonderful.
>thanks,
>KO
Closed Thread


Similar Microsoft Access / VBA bytes