I am trying to place a button on a form to preview a report, I want the report to open and display the same record that is in the form. Here is the code I used in the On_Click event of the button
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "VIR Info Report"
stLinkCriteria = "[IRR#]=" & Me![IRR#]
DoCmd.OpenReport stDocName, , , stLinkCriteria
The problem is that it is printing the report at as well as displaying it on the screen. Does anyone know why this is happening and how I can fix it? Thanks.
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "VIR Info Report"
stLinkCriteria = "[IRR#]=" & Me![IRR#]
DoCmd.OpenReport stDocName, , , stLinkCriteria
The problem is that it is printing the report at as well as displaying it on the screen. Does anyone know why this is happening and how I can fix it? Thanks.