Display record number in subform

G

Guest

Hi all

I hope some guru can help me out there. I'm sure this must be a really easy answer but I can't think of it for the life of me

I have a query that retrieves TEAMNAME, and POINTS from a table TEAM and sorts it descending on the points field. This is simply to show a league table of teams with the team having the highest points displayed at the top. All that I want to do is display the actual position of each team in my form (a continuous form). i.e. the team in 1st position to have a '1' next to it etc

Has anyone any ideas how I can do this?

Any assistance would be greatly appreciated - it's doing my head in

Cheers
Ada
 
R

Roger Carlson

On my website is a small sample database called: "NumberedQuery" which you
could adapt to your problem. It shows how to create a row number in a
query. If you did this in the query behind the form, you should be able to
have what you want.

--
--Roger Carlson
www.rogersaccesslibrary.com
Reply to: Roger dot Carlson at Spectrum-Health dot Org

adamc said:
Hi all,

I hope some guru can help me out there. I'm sure this must be a really
easy answer but I can't think of it for the life of me.
I have a query that retrieves TEAMNAME, and POINTS from a table TEAM and
sorts it descending on the points field. This is simply to show a league
table of teams with the team having the highest points displayed at the top.
All that I want to do is display the actual position of each team in my form
(a continuous form). i.e. the team in 1st position to have a '1' next to it
etc.
 
D

Damon Heron

This is hard to do on a form, but on a report, just add text box, set
control source "=1", and set running sum over group. The report's control
source would be your team table sorted by Points in descending order.

HTH
Damon

adamc said:
Hi all,

I hope some guru can help me out there. I'm sure this must be a really
easy answer but I can't think of it for the life of me.
I have a query that retrieves TEAMNAME, and POINTS from a table TEAM and
sorts it descending on the points field. This is simply to show a league
table of teams with the team having the highest points displayed at the top.
All that I want to do is display the actual position of each team in my form
(a continuous form). i.e. the team in 1st position to have a '1' next to it
etc.
 
S

Stephen Lebans

See:
http://www.lebans.com/rownumber.htm
Rownumber.zip is a database containing functions for the automatic row
numbering of Forms, SubForms and Queries.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


adamc said:
Hi all,

I hope some guru can help me out there. I'm sure this must be a really
easy answer but I can't think of it for the life of me.
I have a query that retrieves TEAMNAME, and POINTS from a table TEAM
and sorts it descending on the points field. This is simply to show a
league table of teams with the team having the highest points displayed
at the top. All that I want to do is display the actual position of each
team in my form (a continuous form). i.e. the team in 1st position to
have a '1' next to it etc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top