printing current form to report - TechRepublic
Question
July 3, 2008 at 03:00 AM
dj_4rce

printing current form to report

by dj_4rce . Updated 16 years, 2 months ago

i have a problem with my project with ms access 2007, i cannot print the current form into report and there is a pop-up message saying like this one once i click the print button that created (not with the wizard):

“The microsoft office access database engine could not find the oblect ‘[MarriageID]=&Me.[MarriageID]”. Make sure the object exists and that you spell its name and the path name correctly.” i checked this out but then once i click the button printing process does not proceed;

here’s the code:

Private Sub cmdPrint_Record_Click()
On Error GoTo Err_cmdPrint_Record_Click

Dim stDocName As String

stDocName = “MarriageReport”
DoCmd.OpenReport stDocName, acViewPrint, “[MarriageID]=& Me. [MarriageID]”

Exit_cmdPrint_Record_Click:
Exit Sub

Err_cmdPrint_Record_Click:
MsgBox Err.Description
Resume Exit_cmdPrint_Record_Click

End Sub

please with this project… thanks

This discussion is locked

All Comments