Counting Records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all,

As you will probably be able to guess by this question I am a complete novice to access but I really need to add record numbers to a query as described below.

I have a query based on two tables which amongst others has a field that returns one of two answers (Route A or Route B) is it possible to add a field or code that consecutively numbers each record in the group starting with One (like using record count, running sum over group in reports)

Many Thanks for any help that you might be able to offer
 
You can use a subquery to generate a sequence number. For instance:
SELECT FirstName, LastName, Score,
(SELECT Count(*)
FROM tblGolfScores S
WHERE S.Score <= tblGolfScores.Score) As Rank
FROM tblGolfScores;

--
Duane Hookom
MS Access MVP


Eric said:
Hello all,

As you will probably be able to guess by this question I am a complete
novice to access but I really need to add record numbers to a query as
described below.
I have a query based on two tables which amongst others has a field that
returns one of two answers (Route A or Route B) is it possible to add a
field or code that consecutively numbers each record in the group starting
with One (like using record count, running sum over group in reports)
 
Back
Top