Forum Discussion
ISO20022-compatible QR Code
George HepworthYes, the effect of the line breaks is visible in the data sheet view of the query, e g
SPC
0200
1
CH65 3000 0001 4000 1784 9
S
GGG Basel Kurse / Geschäftsführung Basel
Eisengasse
5
4051
Basel
CH
50.00
CHF
S
Axxxxx Pxxxx
Xxxxxxstr. 27
4153
Rxxxxx
CH
QRR
267275801
EPD
When I read the QR Code generated by the MERGEBARCODE field with a QR Reader, it shows the data all in one line, without the line breaks. However, when I copy that data and paste it into Word or Notepad, the line breaks appear again as they should. It is very strange.
The line breaks are important, because in ISO20022 they signal the end of a data field, and have to be present even if the data field is empty. When I test the QR code on the ISO20022 testing platform, it gets rejected because the number of fields is incorrect (presumably, it only sees one field when there should be about 30).
I generated the line breaks in the Access query using "Chr(13) & Chr(10)" (and also "Chr$(13) & Chr$(10)", but it made no difference). From the documentation, that seems to be the standard way of inserting line breaks. Do you have any other way?
landste1 I think the problem is that the characters which create the line breaks are not visible to you but they are there. It may be that Access doesn't recognize whatever those line break characters are and therefore doesn't render them appropriately.
What I would do is try to parse the text string and figure out what they are.
- landste1Jul 04, 2020Copper Contributor
George HepworthI did indeed parse the string using an online ASCII converter and a unicode converter that reveal non-printing characters, and the CR/LF codes were there just as they should be. I suspect that the problem lies not with Access itself, but with the MERGEBARCODE field in Word which generates the QR code from the Access DB. That seems to alter the CR/LF in a minor way which disturbs some QR readers but which doesn't show up in ASCII and unicode converters that reveal non-printing characters. It looks like it is something buried deep in the function code, and in that case I shall have to find another solution that doesn't use Word fields.
Thanks anyway for your interest and suggestions, it was encouraging that you tried to help me.