You don't actually want this in the query, do you? Perhaps you want it to show up in a report. If that is the case, do this:
Create a report based on your query, and add an unbound text box control to the detail section, with the following control source setting: =1
Change the running sum property for the control to Over Group, or Over All.
If you want to create a new table from your query so that it generates a new PK, that is a different issue. You can just create the table from the query, and then add an autonumber field to the table, and it will automatically populate.
mmcdonal
|