Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2010

    Unanswered: changing parameters in a sub query using VBA

    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
    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!

  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    whose efficiency are you chasing?
    far smarter use of your time is to get the queries right rather than 'efficient' from the authors use of time, although that is a bonus but the key is execution over time rather than development and testing time right now
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Jun 2010
    the multiple queries are just too hard to manage

    mapping all the objects, etc makes me crazy

  4. #4
    Join Date
    Jun 2010
    this is a database I personally use for work
    I build it on my own time

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts