I have a database that consists of several forms accessed from an unbound Menu titled "SaMain". Each of these forms has command buttons based on macros to print a specific report from the form. One particular form has three command buttons to print three different reports of the form (Print Preview), ie front page, back page, and related additional information.
However, recently, after doing some simple code to change print margins in two of the reports (on Activate), I am now getting an code error window that says "This expression is typed incorrectly, or it is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables. (Error 3071)"
This happens even though I have removed the print margin code from the reports.
The interesting thing is that this error box refers to the unbound "SaMain" menu form when it comes up and OK has to be clicked three times before the report starts printing even when the "SaMain" form is closed Again this is in the Print Preview mode. Then, even when I deleted the "SaMain" form, the error box still comes up, but now refers to "Microsoft Access" in the title box. When I changed the print macros from Print Preview to Print, the error box does not appear.
What I have tried: New command buttons; new report, pasting old report info into new one; new database, importing tables, forms, ect from the old into the new. Nothing made a difference and I cannot locate the location of the error code.