A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Barcode a Custom Autonumber field



 
 
Thread Tools Display Modes
  #1  
Old November 5th, 2009, 12:17 AM posted to microsoft.public.access.reports
Asif Shah
external usenet poster
 
Posts: 16
Default Barcode a Custom Autonumber field

Hello. I'm making a DB that will print a 2x1 inch label that has a field in
barcode font and regular text. The field is my autonumber, however I have
changed its format so its ... "BT"000000...So every record will be
BT000001...BT000002...BT000003. So far so good...I have already downloaded a
code39 font and it works great.

The problem is when I add a start/stop characters to the control source of
that barcoded field so it can be scanned, it ignores my format and treats it
like any other autonumber field, i.e...1....2.....3. So when I print my label
(Zebra label printer) it prints the barcode and text underneath
is...*1*....*2*.....and scans a 1....2....3...So basically the control source
is ignore the format I have put in place. below is my control source.
="*" & [table.field] & "*"

Any ideas?
  #2  
Old November 5th, 2009, 08:42 AM posted to microsoft.public.access.reports
Stefan Hoffmann
external usenet poster
 
Posts: 991
Default Barcode a Custom Autonumber field

hi Asif,

Asif Shah wrote:
Hello. I'm making a DB that will print a 2x1 inch label that has a field in
barcode font and regular text. The field is my autonumber, however I have
changed its format so its ... "BT"000000...So every record will be
BT000001...BT000002...BT000003. So far so good...I have already downloaded a
code39 font and it works great.

So you changed the format property in your table? You shouldn't do that.
Use formatting for UI elements only.

http://office.microsoft.com/en-us/ac...330611033.aspx

This format is only applied when viewing a table or when used with a
form or a report. It is not used when you access data otherwise.

is...*1*....*2*.....and scans a 1....2....3...So basically the control source
is ignore the format I have put in place. below is my control source.
="*" & [table.field] & "*"

Any ideas?

Use an explicit format or simply:

="*BT" & [table.field] & "*"

The best thing you can and should do: Create a standard module and
create a function like this

Public Function FormatBarcode(ANumber As Long) As String

FormatBarcode = "*BT" & ANumber & "*"

End Function

So you have a single point where you can change the format if necessary.


mfG
-- stefan --
  #3  
Old November 5th, 2009, 02:34 PM posted to microsoft.public.access.reports
Duane Hookom
external usenet poster
 
Posts: 7,177
Default Barcode a Custom Autonumber field

The format property sets what you see, not what you actually store.

Try:
="*BT" & Format([FieldName],"000000") & "*"
--
Duane Hookom
Microsoft Access MVP


"Asif Shah" wrote:

Hello. I'm making a DB that will print a 2x1 inch label that has a field in
barcode font and regular text. The field is my autonumber, however I have
changed its format so its ... "BT"000000...So every record will be
BT000001...BT000002...BT000003. So far so good...I have already downloaded a
code39 font and it works great.

The problem is when I add a start/stop characters to the control source of
that barcoded field so it can be scanned, it ignores my format and treats it
like any other autonumber field, i.e...1....2.....3. So when I print my label
(Zebra label printer) it prints the barcode and text underneath
is...*1*....*2*.....and scans a 1....2....3...So basically the control source
is ignore the format I have put in place. below is my control source.
="*" & [table.field] & "*"

Any ideas?

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:35 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.