[AccessD] Query - Add Recordcount Field

Jim Dettman jimdettman at earthlink.net
Thu Nov 11 10:35:08 CST 2004


Mark,

  I think your saying you want the records numbered?

  I use a custom function:

Global glngGetLineCounter As Long

Function GetLineCounter(varName As Variant) As Long

  glngGetLineCounter = glngGetLineCounter + 1
  GetLineCounter = glngGetLineCounter

End Function

  Which I call from the query

LineNo:GetLineCounter(<somefieldname>)


  If you need this in a form or report though, add a control with a running
sum defaulted to 1.

Jim Dettman

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