xlQRCode (1 Viewer)

JohnLit

New member
Local time
Today, 15:03
Joined
Jul 4, 2022
Messages
1
Hi All

I have used this code for a few years an suddenly today an error popped up on my screen type mismatch error 13 in the code below
any help would be appreciated

Thanks

Public Function InitQRCode()

Dim rsParent As DAO.Recordset2
Dim rsChild As DAO.Recordset2
Dim fld As DAO.Field2
Dim db As DAO.Database
Dim strFile As String

SysCmd acSysCmdSetStatus, "Initialising QR generator..."

Set db = CurrentDb
Set rsParent = db.OpenRecordset("tblQRSheet", dbOpenDynaset)
rsParent.MoveFirst
Set rsChild = rsParent.Fields("attachment").Value
Set fld = rsChild.Fields("FileData")
strFile = TempPath() & "QRCode.xlsm"
If Dir(strFile) <> "" Then Kill (strFile)
fld.SaveToFile strFile

Set fld = Nothing
rsChild.Close
rsParent.Close
Set rsChild = Nothing
Set rsParent = Nothing

Set gxlApp = CreateObject("Excel.Application")
Set gxlWB = gxlApp.Workbooks.Open(strFile, False, False)

SysCmd acSysCmdClearStatus

End Function
 

CJ_London

Super Moderator
Staff member
Local time
Today, 06:33
Joined
Feb 19, 2013
Messages
16,618
might be related to an update bug reported a couple of days ago

 

Users who are viewing this thread

Top Bottom