Hello,
I'm trying to put in a macro an "OutputTo" function that outputs a query's result to Excel if a condition is met. The condition should be expressed like :"([Sum of sales for CZSALES]![SumOfsales]>=[Sum of sales for CZSALES yesterday]![SumOfsales])", where "[Sum of sales for CZSALES]" and "[Sum of sales for CZSALES yesterday]" are the queries to compare.
When I run the macro, it shows an error message "Microsoft Access can't find the name 'Sum of sales for CZSALES' you entered in the expression".
This message box suggests to specify if it comes from a form or a report but it doesn't accept if I write the condition like :"(Queries![Sum of sales for CZSALES]![SumOfsales]>=Queries![Sum of sales for CZSALES yesterday]![SumOfsales]).
Can anybody help ?
Thanks
Olivier
I'm trying to put in a macro an "OutputTo" function that outputs a query's result to Excel if a condition is met. The condition should be expressed like :"([Sum of sales for CZSALES]![SumOfsales]>=[Sum of sales for CZSALES yesterday]![SumOfsales])", where "[Sum of sales for CZSALES]" and "[Sum of sales for CZSALES yesterday]" are the queries to compare.
When I run the macro, it shows an error message "Microsoft Access can't find the name 'Sum of sales for CZSALES' you entered in the expression".
This message box suggests to specify if it comes from a form or a report but it doesn't accept if I write the condition like :"(Queries![Sum of sales for CZSALES]![SumOfsales]>=Queries![Sum of sales for CZSALES yesterday]![SumOfsales]).
Can anybody help ?
Thanks
Olivier