Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Barcode Formatting

Status
Not open for further replies.

techi1961

Technical User
Aug 6, 2014
10
0
0
IE
Hi,

I have a barcode report that prints the following barcode in the following format.

(91) 10200169 (37) 1

It use the following control source:

=Code128("~212" & "91" & [Delivery Docket Temp.SpecNo] & "" & "(37)" & [Weight],1,True)

which is taken from a table called Delivery Docket Temp which takes 2 fields named SpecNo and Weight. The barcode works perfect with the exception of the weight field. When the value in the weight field is a single digit the barcode does not format the way I would like.

Example:

If the value entered into the weight field is a double or triple digit (e.g. 10 or any number greater than 10 the barcode prints the following:

(91) 10200169 (37) 10

which is perfect.

But when the value entered into the weight field is a single digit (e.g. 1 or any number from 1 to 9 ) the barcode prints the following:

(91) 10200169 (371

not what I want.

Is there a way to write the following below so the barcode
=Code128("~212" & "91" & [Delivery Docket Temp.SpecNo] & "" & "(37)" & [Weight],1,True)

prints the barcode in this format?

(91) XXXXXXXX (37) X

Any assistance would be greatly appreciated.




 
I don't understand how the () are rendered around the 91 when they aren't in the expression. Are you suggesting the final ) is not rendered when the Weight is a single digit?

Duane
Hook'D on Access
MS Access MVP
 
Hi Duane,

Yes, this is correct and I was able to play around with the placement of "" and finally got to work

=Code128("~212" & "91" & [Delivery Docket Temp.SpecNo] & "" & "(37)" & " " & [Weight],1,True)

Thanks,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top