472,993 Members | 2,158 Online

# Code "Auto-Letters" ?

Greetings:
the group - I've scoured for about two hours and I can't find a
solution. I also appoligize if I over complicate my question, but I
want to be sure that I communicate my thought(s).

The database I'm working on will generate tens, perhaps hundreds of
thousands of records, each of which need to be identified uniquely.
Using the autonumber would be ideal except that I'll need to use this
unique field to generate barcodes which will have to be printed on
small labels. So - If I get to record 999,999 and generate a barcode
for it, the barcode will be huge - or to big to fit on my label.

I think my solution would be to use letters rather than numbers.
Instead of counting 1, 2, 3, 4... 1,000; I want to count A, B, C, D...
ABCD. I guess my logic can be flawed, but I was thinking that since
there are 26 letters in the alphabet and only 10 numbers, I would be
able to get quite a bit farther in each place value using letters.

Thanks a bunch for any suggestions!

Matt

Nov 13 '05 #1
3 3052
ma**@1320am.com wrote in
Greetings: I think my solution would be to use letters rather than
numbers. Instead of counting 1, 2, 3, 4... 1,000; I want to
count A, B, C, D... ABCD. .

Thanks a bunch for any suggestions!

Matt

Use the autonumber in the table and write a function that takes the
modulo 36 (26Letters+ 0-9 digits) of your number and converts it to
a digit or letter and then loops to process the remaining value and
use that on your barcode..Sorta like Hex but with all letters of
the alphabet instead of just 0-9,A-F.

--
Bob Quintal

PA is y I've altered my email address.
Nov 13 '05 #2
Matt,
Mathematically all you are doing is counting a series that iterates by one
and has a base of 26. Once you generate the next number in the series it's
a simple matter of using the char(ansivalue) function to return the
character for that number. Now, a 15 digit number will give you a maximum
value of 999,999,999,999,999. That's a quadrillion rows in a single table
before you run out of numbers. Access won't hold a quadrillion rows, as far
as I know. So you'll run out of rows in your table before you run out of
numbers if you used a simple numeric sequence. You could still declare as a
15 character text column that held your sequence numbers. If I were you I'd
just use a numeric sequence of my own design. Even if you interated by ten
you'd still have over 100 billion numbers--plenty.

<ma**@1320am.com> wrote in message
Greetings:
the group - I've scoured for about two hours and I can't find a
solution. I also appoligize if I over complicate my question, but I
want to be sure that I communicate my thought(s).

Nov 13 '05 #3
Matt,
It also occurs to me that the 2-D bar codes that UPS uses probably can fit
more values in the same small space because it uses a pattern of squares to
hold the data instead of a pattern of bars. This may not be a database
problem as much as it is a choice of bar code software problem.

<ma**@1320am.com> wrote in message
Greetings:
the group - I've scoured for about two hours and I can't find a
solution. I also appoligize if I over complicate my question, but I
want to be sure that I communicate my thought(s).

The database I'm working on will generate tens, perhaps hundreds of
thousands of records, each of which need to be identified uniquely.
Using the autonumber would be ideal except that I'll need to use this
unique field to generate barcodes which will have to be printed on
small labels. So - If I get to record 999,999 and generate a barcode
for it, the barcode will be huge - or to big to fit on my label.

I think my solution would be to use letters rather than numbers.
Instead of counting 1, 2, 3, 4... 1,000; I want to count A, B, C, D...
ABCD. I guess my logic can be flawed, but I was thinking that since
there are 26 letters in the alphabet and only 10 numbers, I would be
able to get quite a bit farther in each place value using letters.

Thanks a bunch for any suggestions!

Matt

Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.