report printing problem

bone head

Registered User.
Local time
Today, 01:27
Joined
Feb 11, 2002
Messages
73
Hello

I am trying to print out a report of only certain records ie where feild credit aprov = " approved"

I am using the following text and am only getting one blank copy of the report.

What am i doing wrong

MAny thanks

Private Sub print_credit_Authorisation_Click()
On Error GoTo Err_print_credit_Authorisation_Click

Dim stDocName As String

stDocName = "credit authorisation"
DoCmd.OpenReport stDocName, acNormal, , "[Credit Approv]=Approved"

Exit_print_credit_Authorisation_Click:
Exit Sub

Err_print_credit_Authorisation_Click:
MsgBox Err.Description
Resume Exit_print_credit_Authorisation_Click

End Sub
 
Try:

DoCmd.OpenReport stDocName, acNormal, , "[Credit Approv] = 'Approved'"


Note single quote mark ' around approved to classify as text (not parametre)

ie: 'approved'

Brad.
 
Many thanks
 

Users who are viewing this thread

Back
Top Bottom