Openr report in VBA Not working after windows 11 update (4 Viewers)

PhilUp

Registered User.
Local time
Yesterday, 22:41
Joined
Mar 4, 2015
Messages
61
Hi,
I have been running this VBA for years, however since yesterday after the security update from Microsoft, it does nort work anymore.
Private Sub Command117_Click()
Dim stReportName As String
Dim stLinkCriteria As String

If Me.Dirty Then
Me.Dirty = False
End If

DoCmd.SetWarnings False
DoCmd.OpenQuery "UpdateFileName", acViewNormal, acEdit
DoCmd.SetWarnings True

If Forms!Sales.Language = "F" Then
stReportName = "InvoiceReportF"
ElseIf Forms!Sales.Language = "D" Then
stReportName = "InvoiceReportD"
Else: stReportName = "InvoiceReport"
End If
stLinkCriteria = "[InvoiceID]=" & Me![InvoiceID]
DoCmd.OpenReport stReportName, acViewReport, , stLinkCriteria
End Sub

It bugs, highlighting the last command.

Woud greatly appreciate any help.
 
Can you roll back your OS update just to see if the problem goes away?
 

Users who are viewing this thread

Back
Top Bottom