Link to home
Start Free TrialLog in
Avatar of Jon Bredensteiner
Jon BredensteinerFlag for United States of America

asked on

Sequentially Number Records in Groups in an Access Query

I’m trying to create sequentially numbered groupings in an Access query.  To make this easier, I’ve created two small tables containing one field each, and one query to combine the two tables.

I’m not sure how to create sequentially numbered groupings in Access, but I do know how to do this in Excel, so I worked it out and included an example Excel file.  The three highlighted columns in the Excel file are examples of the three fields I'm trying to create in Access, which are:

1)      [TableOrder]
a.      Sequentially number the records returned by the query from 1 to whatever the total record count is (260)

2)      [ModuleGroup]
a.      Sequentially number the records by the groups created from the values in [Modules]
i.      The query is sorted by the [PRR] field, which is a concatenation of [Modules]&”-“&[Parts], and it can be used as a unique record identifier if one is needed

3)      [ModuleGroupOrder]
a.      Sequentially number the records from 1 to however many records are in each [ModuleGroup], then starting back over with 1 for each [ModuleGroup]

Thank you in advance for your help, Jon  
TestOrder.mdb
qryTestOrder.xls
ASKER CERTIFIED SOLUTION
Avatar of Thomasian
Thomasian
Flag of Philippines image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jon Bredensteiner

ASKER

You're the man Sage.  I've been trying to do this for like a year.