Hi, my knowledge of js is zero. My need is to create QR Codes in an access database and store them on disk as an image (.png) for inclusion in reports.
I am using sample code downloaded from the internet and the QR Code is created OK and displayed in an image control - Line 120.
The next step, Line 140, fails with error "Unable to get property 'src' of undefined or null reference".
Any advice will be appreciated.
I am using sample code downloaded from the internet and the QR Code is created OK and displayed in an image control - Line 120.
The next step, Line 140, fails with error "Unable to get property 'src' of undefined or null reference".
Code:
120 oWebBrowserObject.Document.parentWindow.execScript (sCmd)
130 If IsNull(Me.ID) = False Then
140 oWebBrowserObject.Document.parentWindow.execScript ("var qr = $('#qrcode img')[0].src;")
150 sQRCode = oWebBrowserObject.Document.Script.qr
160 sQRCode = Replace(sQRCode, "data:image/png;base64,", "") 'Remove the initial string portion that isn't relevant
170 If sQRCode <> "" Then
180 WriteByteArrayToFile DecodeBase64(sQRCode), sQRCodesPath & Me.ID & ".png"
190 End If
200 End If