
Originally Posted by
Kabethy
Hi Everyone,
I am new in access, maybe this has a very simple answer. I had to migrate this function previously in access 2000 to access 2010 while working with adp's all works fine but when I convert my adp's into adp's the very simple steps shown below dont work anymore and I get the error
Error #28557
* The expression may not result in the name of a macro,
the name of a user-defined function, or [Event Procedure].
* There may have
been an error evaluating the function, event, or macro.
Private Sub cmdPrint_Click()
Dim strDryCleaningParameters As String
DoCmd.Echo False
strDryCleaningParameters = gobjTicket.gstrLaundryNumber
SetDryCleaningReportParameters "rptWwLaundryDryCleaningPrintTickets", strDryCleaningParameters
DoCmd.OpenReport "rptWwLaundryDryCleaningPrintItemTickets", 2
DoCmd.PrintOut
DoCmd.Close acReport, "rptWwLaundryDryCleaningPrintItemTickets", acSaveYes
' Set echo as it was
DoCmd.Echo True
End Sub
What am I getting wrong? I tried also without Print out and although no error is triggered no print is coming out =( when pressing the button I receive a quick screen saying printing but then nothing is printed. Any idea?
Private Sub cmdPrint_Click()
Dim strDryCleaningParameters As String
strDryCleaningParameters = gobjTicket.gstrLaundryNumber
SetDryCleaningReportParameters "rptWwLaundryDryCleaningPrintTickets", strDryCleaningParameters
DoCmd.OpenReport "rptWwLaundryDryCleaningPrintItemTickets", acViewNormal
End Sub