Storing Barcodes

P

Phil

Hi

I wish to store barcodes in a field, is the Single field size the one i
should be using?

If so, is there anyway to make a Single type field display the whole number,
not the scientific version of it?


Thankyou
 
G

Guest

hi,
Barcodes are just another font.
Access and excel uses font 3 of 9 barcode.
So store the number in your table and display it as font 3
of 9 barcode.
if you are haveing problems with single, use double.
 
T

Tony Toews

Barcodes are just another font.
Access and excel uses font 3 of 9 barcode.

Actually they can use any barcode symbology for which you have the
font installed.
So store the number in your table and display it as font 3
of 9 barcode.

I'd store it as text.
if you are haveing problems with single, use double.

Single is very likely to be too short. I wouldn't use double because
some bar codes could have text, hyphens or whatever.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 
P

Phil

I don't actually want to store the barcode in access, just the number.

I'm using the barcode number as the primary key for a table, they're just 13
digit numbers, no text or other characters. Using single stores the number
ok, but I want it displayed as an integer, not in scientific notation.

Any other tips?

Cheers
 
T

Tony Toews

Phil said:
I don't actually want to store the barcode in access, just the number.

You can't store the barcode. All you can store is the value
belonging to the barcode. All you are doing is using a font to
display the barcode digits/text. Think of it as a boring form of,
Wing Dings.
I'm using the barcode number as the primary key for a table, they're just 13
digit numbers, no text or other characters. Using single stores the number
ok, but I want it displayed as an integer, not in scientific notation.

A single stores 13 digits ok? I don't think so.

From the Access 97 help.

"Single
(single-precision floating-point) 4 bytes -3.402823E38 to
-1.401298E-45 for negative values; 1.401298E-45 to 3.402823E38 for
positive values
Double
(double-precision floating-point) 8 bytes -1.79769313486232E308
to -4.94065645841247E-324 for negative values; 4.94065645841247E-324
to 1.79769313486232E308 for positive values"

A double might work but you've only got one spare digit. Singles
and double fields may not index well either.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 
B

Brendan Reynolds

It's also quite common that leading zeros are significant in the kind of
'numbers' that are commonly represented as barcodes. All things considered,
unless calculations will be performed on these numbers, I'd go with the
earlier recommendation to use a Text field.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
T

Thomas Lutz

Bar codes are based on string data and the best way to store the bar
code data in your database will be to use the string data type for the
field containing the data.
If you are looking for an excellent tool for printing bar codes from
within Access, you might want to look at the TAL Bar Code ActiveX
control. You can download a demo version from:
http://www.taltech.com/products/activex_barcodes.html
 
Top