J
Jim
Hi. On this report that are an Invoice we use a 3rd party component for
generating barcodes. The barcode component collects data from textboxes and
labels around the report. Now we need to change one of the labels involved
in this generating of barcodes. The label has been "hardcoded", i.e. the
value has been the labels caption and now we need to collect this data from
a table that is bound to the report.
Peace of cake we thought, we just change the label "lbltest" to a textbox
with the same name and have the controlsource of the textbox to pick the
value from the underlying table. Well, that did not work.
Here is a piece of the code from the reports page footer on format event
that generates the barcode:
lblBarcode.Caption = bc.CreateBarCode(CLng(txtSumTotal * 100), 2,
CStr(LblTest.Caption), Format(txtDueDate, "YYMMDD"), txtReferencenr)
that is producing the barcode to the lblBarcode. Our goal is to have the
values that is now in "CStr(LblTest.Caption)" change dynamically, i.e. pick
up the values from the underlying table instead of being static.
We have tampered with this for hours without any luck. It seems that the
LblTest.Caption has to be a string, therefore the CStr(.. right? How do we
get the textbox value bound to the underlying table to fit into the piece of
code? We tested to change the label to a textbox and do CStr(LblTest.Value)
in many variations, we tested to have an invisible textbox and by VBA move
over the values from the textbox to the label at run time (on format) but
without luck, we tested to put in the underlying table's fieldname into the
piece of code in different variations, we t... pheeew
btw, the underlying table's format is text. the values are like 12345-678795
(with the "-")
Anu suggestions/ help would be wery appreciated indeed.
I'm afraid that our english is not good enough to explain this problem
further, we'd be glad to answer any questions if someone would bother taking
a look at this and maybe help us. Needless to say, we're not exactly any
Access gurus Jimmy & Tina.
generating barcodes. The barcode component collects data from textboxes and
labels around the report. Now we need to change one of the labels involved
in this generating of barcodes. The label has been "hardcoded", i.e. the
value has been the labels caption and now we need to collect this data from
a table that is bound to the report.
Peace of cake we thought, we just change the label "lbltest" to a textbox
with the same name and have the controlsource of the textbox to pick the
value from the underlying table. Well, that did not work.
Here is a piece of the code from the reports page footer on format event
that generates the barcode:
lblBarcode.Caption = bc.CreateBarCode(CLng(txtSumTotal * 100), 2,
CStr(LblTest.Caption), Format(txtDueDate, "YYMMDD"), txtReferencenr)
that is producing the barcode to the lblBarcode. Our goal is to have the
values that is now in "CStr(LblTest.Caption)" change dynamically, i.e. pick
up the values from the underlying table instead of being static.
We have tampered with this for hours without any luck. It seems that the
LblTest.Caption has to be a string, therefore the CStr(.. right? How do we
get the textbox value bound to the underlying table to fit into the piece of
code? We tested to change the label to a textbox and do CStr(LblTest.Value)
in many variations, we tested to have an invisible textbox and by VBA move
over the values from the textbox to the label at run time (on format) but
without luck, we tested to put in the underlying table's fieldname into the
piece of code in different variations, we t... pheeew
btw, the underlying table's format is text. the values are like 12345-678795
(with the "-")
Anu suggestions/ help would be wery appreciated indeed.
I'm afraid that our english is not good enough to explain this problem
further, we'd be glad to answer any questions if someone would bother taking
a look at this and maybe help us. Needless to say, we're not exactly any
Access gurus Jimmy & Tina.