Need to add a barcode serial number to a report that will be used as a coupon. The serial number is kept in GBL_SerNo. CouponSerNo is a textbox on the report that is set to barcode 39 font. The following code will print the bar code, but it will not scan. I found that I need to add an asterisk to the front and back of the barcode data.
DoCmd.OpenReport "rptCoupon", acViewPreview 'Open the Email Report
reports!rptCoupon!CouponSerNo.Value = GBL_SerNo 'Add Serial number
Thinking that it might require to be text id the following.
Dim inSerNo as string
DoCmd.OpenReport "rptCoupon", acViewPreview 'Open the Email Report
inSerNo = CStr(GBL_SerNo)
Reports!rptCoupon!CouponSerNo.Value = "*" & [inSerNo] & "*"
I get an error stating : you can't assign a value to this object. I 've tried adding quotes to the inSerNo but get the same result. I copied this last attempt from a site that gave the above as an example.
Help would be appreciated.
Windows 7
Office 10
Thanks
jpl
DoCmd.OpenReport "rptCoupon", acViewPreview 'Open the Email Report
reports!rptCoupon!CouponSerNo.Value = GBL_SerNo 'Add Serial number
Thinking that it might require to be text id the following.
Dim inSerNo as string
DoCmd.OpenReport "rptCoupon", acViewPreview 'Open the Email Report
inSerNo = CStr(GBL_SerNo)
Reports!rptCoupon!CouponSerNo.Value = "*" & [inSerNo] & "*"
I get an error stating : you can't assign a value to this object. I 've tried adding quotes to the inSerNo but get the same result. I copied this last attempt from a site that gave the above as an example.
Help would be appreciated.
Windows 7
Office 10
Thanks
jpl