help with vba issue

bigmac

Registered User.
Local time
Today, 02:44
Joined
Oct 5, 2008
Messages
302
hi all, I am running the following code
Private Sub SearchResults_DblClick(Cancel As Integer)

Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "monthly report"

stLinkCriteria = "[record id]=" & Me![searchresults]
DoCmd.OpenReport stDocName, , , stLinkCriteria
End Sub
to try to open a report to view but it just sends it to the printer, what am I doing wrong please? cheers:confused:
 
Try

Code:
DoCmd.OpenReport stDocName, acViewPreview, , stLinkCriteria
or
Code:
[B]
DoCmd.OpenReport stDocName, acViewReport, , stLinkCriteria[/B]

With acViewPreview you can right-click and hit Print.

Linq ;0)>
 
Last edited:

Users who are viewing this thread

Back
Top Bottom