Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

changing parameters in a sub query using VBA

$
0
0
Thanks for reading my post!

I am attempting an efficient database utilizing common queries.
I have a 4 subquery series built up, all left joins so all invoices from tblinvoices are returned-
qryMR1/customer invoices
qryMR2/customer invoices with payments
qryMR3/customer invoices with payments that have been purged
then
qryMR4/a sums query by customer
I have customer number and 5 sums fields

qryMR4 is record source for a subreport

The subreport is used in main reports that have different date, age, value criteria which I have written with VBA querydefs.

I need my subreport to match the main report querydefs, except, since it is a sum query, the field I need in my where clause is in QryMR3

How can I write VBA querydef to execute qryMR3 where clause so that it is the resulting qryMR4 I need when the main report opens???

Any feedback is greatly appreciated!

Viewing all articles
Browse latest Browse all 13329

Trending Articles