Hi all,
Could I have some help with this one please.
I use a form from which I print a report. The code is as follows;
Private Sub PrintDepositSlip_Click()
Dim strDocName As String
Dim strWhere As String
strDocName = "rptDepSlip"
strWhere = "[RecordNo]=" & Me!RecordNo
DoCmd.OpenReport strDocName, acPreview, , strWhere
End Sub
The form appears from which I can print ok. No problems.
If I use this code to print the form without the preview it prints then comes up with a microsoft error so that the database has to close;
Private Sub PrintDepositSlip_Click()
Dim strDocName As String
Dim strWhere As String
strDocName = "rptDepSlip"
strWhere = "[RecordNo]=" & Me!RecordNo
DoCmd.OpenReport strDocName, acNormal, , strWhere
End Sub
Is there an answer to this problem. Have tried crerating a new form with report etc but still has the same problem.
Many thanks,
Ken
Could I have some help with this one please.
I use a form from which I print a report. The code is as follows;
Private Sub PrintDepositSlip_Click()
Dim strDocName As String
Dim strWhere As String
strDocName = "rptDepSlip"
strWhere = "[RecordNo]=" & Me!RecordNo
DoCmd.OpenReport strDocName, acPreview, , strWhere
End Sub
The form appears from which I can print ok. No problems.
If I use this code to print the form without the preview it prints then comes up with a microsoft error so that the database has to close;
Private Sub PrintDepositSlip_Click()
Dim strDocName As String
Dim strWhere As String
strDocName = "rptDepSlip"
strWhere = "[RecordNo]=" & Me!RecordNo
DoCmd.OpenReport strDocName, acNormal, , strWhere
End Sub
Is there an answer to this problem. Have tried crerating a new form with report etc but still has the same problem.
Many thanks,
Ken