ajetrumpet
04-13-2009, 09:25 AM
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:SELECT DCount("YOURFIELD","YOURTABLE",
"YOURFIELD <=" & [temp]) AS rownumber,
YOURFIELD.YOURTABLE 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! :)
*Sorting
*Grouping
*Calling VBA functions within queries
*Concatenations
This is a simple procedure, and the code is basically as follows:SELECT DCount("YOURFIELD","YOURTABLE",
"YOURFIELD <=" & [temp]) AS rownumber,
YOURFIELD.YOURTABLE 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! :)