How can I insert Autonumber in query

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

Guest

How can I insert autonumber field in my query.
This is my 2 Table
Table1 has 4 field: A, B, C and D
Table2 has 3 field: B, M and N
I need result in query 4 field like tihs
autonumber,A, B and M
sorting by B and then insert autonumber field
 
How can I insert autonumber field in my query.
This is my 2 Table
Table1 has 4 field: A, B, C and D
Table2 has 3 field: B, M and N
I need result in query 4 field like tihs
autonumber,A, B and M
sorting by B and then insert autonumber field

An Autonumber will not work here: it only exists in Tables, not in
Queries.

You can dynamically display a record counter on a Report by including
a textbox with a Control Source of 1 (just the number one) and setting
its RunningSum property to Over All.

In a Query you can include a calculated field:

Autonumber: DCount("*", "[YourQUeryName]", " <= " & )

Note that this can be rather slow since it must rerun the entire query
to count records - for every record returned.

John W. Vinson[MVP]
 
Back
Top