Error 3075

eyalco

Registered User.
Local time
Yesterday, 17:46
Joined
Jul 24, 2007
Messages
50
I have a form (invoice) and on the after update even I have a print order (invoice report) filtered in this manner :

strReportName = "rpt_invoice"
strCriteria = "[invoice_no]= " & Me![INVOICE_NO]

DoCmd.OpenReport strReportName, acViewPreview, , strCriteria
when I move in the form to the sub form or try to print I get this message :


RUN-TIME ERROR 3075. EXTRA IN QUERY EXPRESSION
'(=[INVOICE_NO])'.

I checked the query related or table and there's no prblem.

What is it then please?
 
Set a breakpoint:
Code:
strReportName = "rpt_invoice"
[COLOR="DarkRed"]strCriteria = "[invoice_no]= " & Me![INVOICE_NO][/COLOR]

DoCmd.OpenReport strReportName, acViewPreview, , strCriteria
and look what the value Me![INVOICE_NO] is. It should be a number according to the rest of the code.
That's probably not the problem.
Check out the query that's bound to the report and run it stand-alone. I believe you can find the error there.

HTH :D
 
The query is ok. I found that if I take out the printing process from the after update event, then the problem goes away.
Any idea why?
Should I place printing in another event in the form? IF not, then why is this problem occuring?
 

Users who are viewing this thread

Back
Top Bottom