Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print Preview Button looses place after three hits

Status
Not open for further replies.

RobotMush

Technical User
Aug 18, 2004
197
0
0
US
In order to print just the client and all pertaining data for that client I have created a print client data button.

Which is...

Private Sub cmdPrevRpt_Click()
On Error GoTo Err_cmdPrevRpt_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "rptClientDetail"
stLinkCriteria = "[strClntID] =" & "'" & Me![strClntID] & "'"
DoCmd.OpenReport stDocName, acViewPreview, , stLinkCriteria

Exit_cmdPrevRpt_Click:
Exit Sub

Err_cmdPrevRpt_Click:
MsgBox Err.Description
Resume Exit_cmdPrevRpt_Click

End Sub

Testing it I find I can do a Ctrl F to find a client and get a proper print privew. However, after the second Ctrl F to find a client I do a print preview that gives me a different Client and data that does not go with that client. What am I needing to inclued in the program to rectify this problem?

Thank you for your help.

RobotMush (Technical User - Self Taught)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top