Previouw a specific repport

sofie

Registered User.
Local time
Today, 15:37
Joined
Jan 17, 2002
Messages
12
Hi,

I would like to click on the button and previeuw the speccific record, to print out.

What am I doing wrong?

Thanx

Private Sub cmdPreview_Click()
On Error GoTo Err_cmdPreview_Click

Dim stDocName As String

stDocName = "rptFormA"
DoCmd.OpenReport stDocName, acPreview

Exit_cmdPreview_Click:
Exit Sub

Err_cmdPreview_Click:
MsgBox Err.Description
Resume Exit_cmdPreview_Click

End Sub
 
Does the report show at all? What is the error that you are getting?
 
Look up the OpenReport Method to see how to supply parameters that can be used for filtering. I suggest using the "where" parameter.
 
im also have problem on this..same as sofie..preivew the report..click on the button and previeuw the speccific record..how?(eg: Today report, Yesterday report, last week report, and view all report) in one button?How to do this help me..
 

Users who are viewing this thread

Back
Top Bottom