Admin Sparky
dba.email at gmail.com
Mon Feb 21 12:26:37 CST 2005
Drew, It is neither. Hopefully, in the end, it will provide the source data for an embedded chart in an ad-hoc Powerpoint presentation. Recently, with the help of the list, I attempted to achieve this using in-line subqueries, however, the fact that I am running a totals query made that approach problematic. The query is already grouped by year and month, the problem is that I need only the top 5 records for each month-year combination. Upon reflection, it seemed that I might be able to run a top 5 totals query repeatedly for a single month and achieve my goal. Mark On Mon, 21 Feb 2005 11:21:42 -0600, DWUTKA at marlow.com <DWUTKA at marlow.com> wrote: > Just out of curiousity Mark, why do you need to 'run' a query multiple > times. If it's a report, you can group by the month, if it's an update > query, you can still run it internally for each month. > > Drew > > -----Original Message----- > From: Admin Sparky [mailto:dba.email at gmail.com] > Sent: Monday, February 21, 2005 8:47 AM > To: Access Developers discussion and problem solving > Subject: [AccessD] Query Criteria > > Group, > > Monday morning has arrived:( I have a form with 2 calendar controls > that can provide a date range. I would like to use this date range as > criteria for a query. However, I am having difficulty with the > following scenario. Given a multiple-month date range, I would like > to run the query "n" number of times for each month in the range. The > solution must be able to span multiple years if needed. > > Pseudo code: > dteStart = 8/1/2004 > dteEnd = 1/31/2005 > > For each month in the date range > run the query > Next month > > Any suggestions? > > Mark Mitsules > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >