I'm puzzled on this one.
I have continuous form, that has a command button that executes on click the follow code.
When I click the command button, the printer dialog box flashes quickly and it gets sent to the printer and prints.
Problem is, I don't want it sent to the printer, I just want the report to open.
What's wrong here?
I have continuous form, that has a command button that executes on click the follow code.
Code:
Private Sub buttonOpenReport_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Location_Funded_Letter2020_R"
stLinkCriteria = [Location_Description] = "'" & Me![Location_Description] & "'"
DoCmd.OpenReport stDocName, acViewNormal, , stLinkCriteria
End Sub
When I click the command button, the printer dialog box flashes quickly and it gets sent to the printer and prints.
Problem is, I don't want it sent to the printer, I just want the report to open.
What's wrong here?