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)
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)