Row Numbers / Numbering Rows (Query or Form) (1 Viewer)

Status
Not open for further replies.

ajetrumpet

Banned
Local time
Today, 17:27
Joined
Jun 22, 2007
Messages
5,638
This example shows you how to number your rows in a query, and thus be able to do the same in a form based on the query. Queries can be numbered using this same technique when combined with other techniques as well. Such as:

*Sorting
*Grouping
*Calling VBA functions within queries
*Concatenations


This is a simple procedure, and the code is basically as follows:
Code:
SELECT DCount("[B]YOURFIELD[/B]","[B]YOURTABLE[/B]",
   "[B]YOURFIELD [/B]<=" & [temp]) AS rownumber, 
      [B]YOURFIELD[/B].[B]YOURTABLE [/B]AS temp


NOTICE: Ordering of the field list in the SELECT statement does not matter here.


Any suggestions welcome on the improvement of this. HTH! :)
 

Attachments

  • Row Numbers (Query or Form).zip
    63.4 KB · Views: 5,238
Status
Not open for further replies.

Users who are viewing this thread

Top Bottom