I have this form.
I have a button on it to print.
I think it is best to print a report instead of the form.
on the button of my form I have this:
Private Sub cmdPrintTheRpt_Click()
DoCmd.OpenReport "rptStatus_TenderPerDeal", acViewNormal, "", "[ID]=[Forms]![frmStatus_TenderPerDeal]![ID]", acNormal
I basically am opening the report with the same ID as the the ID on the form. Both report and form have the same recordsource (I saved the form as a report).
When I press the button on the form, the code above returns a runtime error 2212: "Cant print the report."...see pic below. I got the code from online and I am not even sure why the code executes a PRINT because I dont see any code for PRINT (only OPEN).
How can I print the report but with the Where condition? Any better ideas are welcome. thank you.