View Full Version : Printing report problem


drobe9
11-06-2001, 07:06 AM
Hi everyone,

I hope that someone can help!!! I have developed a data entry form that I would like to use in my business. However here is the problem. I have put a print command on the form to print a report but I only want the current record to print but want it to print in the report format and I can not seem to figure this out or know if it is even possible to do. When I click on the print command button every record prints out and there are thousands of records.

Any help or suggestions will be a great help!
Thanks in advance!

Robbie

Rich
11-06-2001, 07:28 AM
There is more than one way to skin this beast. Use a query which restricts the records returned or filter the report.
Download solutions, rptsamp97 etc from the Microsoft site for examples.

drobe9
11-07-2001, 08:16 AM
Rich or anyone

I am still clueless here?????????????????

drobe9
11-07-2001, 10:51 AM
ok I am down on my knees here begging for some kind of help.
This is what the syntax for the command button looks like (notice 201, that is how many times I have cut this button of my form)

Private Sub Command201_Click()
On Error GoTo Err_Command201_Click

Dim stDocName As String
Dim stfilter As String
stDocName = "claimrpt"
stfilter = "Claim Number = forms!claimform!Claim Number"
DoCmd.OpenReport stDocName, acViewNormal, , stfilter

Exit_Command201_Click:
Exit Sub

Err_Command201_Click:
MsgBox Err.Description
Resume Exit_Command201_Click

End Sub

When I run the form and press the button I get a "syntax error missing operator in the stfilter line

Can anyone help!!!!!!!!!