[AccessD] Query - Add Recordcount Field

Mitsules, Mark Mark.Mitsules at ngc.com
Thu Nov 11 13:25:19 CST 2004


Lambert,

My current method does utilize the RunningSum property.  This question
loosely relates to a previous thread regarding table joins.  I'm hoping to
eventually run across the subject of subqueries in my archives which ties
these two threads together.

Mark


-----Original Message-----
From: Heenan, Lambert [mailto:Lambert.Heenan at aig.com] 
Sent: Thursday, November 11, 2004 1:37 PM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] Query - Add Recordcount Field


'fraid not. That will just give you "1" in every row (after you've turn the
query into a Totals query, .Count(PK) as Cnt simply wont work at all in a
standard select query).

My question is why you want to do this in a query? If the end result it to
be used in a report or a form then you don't need to modify the query,
instead you modify the report or form to use the RunningSum property. It's
all there in the on-line help.

Lambert

> -----Original Message-----
> From:	accessd-bounces at databaseadvisors.com
> [SMTP:accessd-bounces at databaseadvisors.com] On Behalf Of John W. Colby
> Sent:	Thursday, November 11, 2004 11:11 AM
> To:	'Access Developers discussion and problem solving'
> Subject:	RE: [AccessD] Query - Add Recordcount Field
> 
> Count(PK) as Cnt in the select clause
> 
> Where PK is the primary key
> 
> John W. Colby
> www.ColbyConsulting.com 
> 
> Contribute your unused CPU cycles to a good cause:
> http://folding.stanford.edu/
> 
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mitsules, Mark
> Sent: Thursday, November 11, 2004 10:40 AM
> To: [AccessD]
> Subject: [AccessD] Query - Add Recordcount Field
> 
> 
> Group,
> 
> Someone has this at the top of their head or near their
> fingertips...hopefully.  In a query, what is the syntax to add a running
> recordcount column?  Thanks.
> 
> 
> Mark
> -- 
> Website: http://www.databaseadvisors.com
-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list