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