counting records in a query

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

Guest

I am hoping to be able to add numbers to the names I have listed in a query. For instance

1 John Do
2 Jane Smit
3 Lise Scot

So it counts the total number of people or records returned. i am sure this is possible but I can't get it to work

THANKS

DOL
 
First, you could add an Autonumber Field in your table, then make it Primary
Key. I will increment automatically.
Second...
Open your Query, and make it Totals (click the Sum Sign in the toolbar).
Now you will have a Totals Row in the Lower Pane.
Drag the Name Field to the lower pane, it will show Group By in the Total
Row. Then just change the Group By to Count. Run the Query, it will show the
number of records.
 
If you simply want to count the number of rows returned, check Access VB
Help on the DCount() function.

--
HTH
Van T. Dinh
MVP (Access)


dola said:
I am hoping to be able to add numbers to the names I have listed in a query. For instance,

1 John Doe
2 Jane Smith
3 Lise Scott

So it counts the total number of people or records returned. i am sure
this is possible but I can't get it to work.
 
Back
Top