Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    May 2001
    Location
    Omaha, NE USA, Nebraska, USA
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    numbering items in an changing report (Access 97/SR1)

    All:

    I have a report that I run on a monthly basis that ranks employees based on their production averages from previous months. I am wondering if there is a way to add a control to the report that will number the detail lines in the report.

    The report is sorted by Supervisor, then budget center, then by production average (descending). When the report runs, I will get something like:
    <pre> John Doe
    Center 60111
    Jimmy 5.00
    Susie 4.99
    Billy 4.73
    Tommy 4.37
    Rachel 3.97</pre>

    and what I would like to see is:
    <pre> John Doe
    Center 60111
    <font color=red>1</font color=red> Jimmy 5.00
    <font color=red>2</font color=red> Susie 4.99
    <font color=red>3</font color=red> Billy 4.73
    <font color=red>4</font color=red> Tommy 4.37
    <font color=red>5</font color=red> Rachel 3.97</pre>


    Where the numbering starts over at one (1) at every change of budget center.

    Is this even possible? from withing the query?, the report?, or from code?

    Any and all <img src=/S/help.gif border=0 alt=help width=23 height=15> is greatly appreciated. <img src=/S/grovel.gif border=0 alt=grovel width=31 height=23>

  2. #2
    2 Star Lounger
    Join Date
    May 2001
    Location
    Omaha, NE USA, Nebraska, USA
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: numbering items in an changing report (Access 97/SR1)

    OOPS! I meant to attach this sample for anyone to look at.

    Musta been <img src=/S/doze.gif border=0 alt=doze width=15 height=15>
    Attached Files Attached Files

  3. #3
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    La Verne, California, USA
    Posts
    313
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: numbering items in an changing report (Access 97/SR1)

    Steve,

    Just add a text box to the appropriate section and set its DATE SOURCE to =1 . Set it to sum over the group.

  4. #4
    yamafopa
    Guest

    Re: numbering items in an changing report (Access 97/SR1)

    Make sure you Order By the Production Average, too...

  5. #5
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: numbering items in an changing report (Access 97/SR1)

    I have a report where I put two text boxes in the detail section. One textbox is named txtrunningsum. In the properties for that textbox:
    Control Source - =1
    Visible - No

    The other textbox is named txtnumber
    Control source - [txtrunningsum] & "."
    Visible - Yes

    The txtnumber textbox I put beside what I want to number. Hope this helps....

  6. #6
    2 Star Lounger
    Join Date
    May 2001
    Location
    Omaha, NE USA, Nebraska, USA
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: numbering items in an changing report (Access 97/SR1)

    Thanks to all for you responses.

    I got Preston's solution to work. <img src=/S/thumbup.gif border=0 alt=thumbup width=15 height=15> But, could not get Linda's to work. the txtnumber textbox had a 1 in every detail record. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>

  7. #7
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Minneapolis, Minnesota, USA
    Posts
    262
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: numbering items in an changing report (Access 97/SR1)

    As an aside, Charlotte pointed out in a previous post that there is a great download to be found <A target="_blank" HREF=http://support.microsoft.com/support/kb/articles/Q231/8/51.ASP>here</A>. It is in Access 2000, but I'm sure if you poke around there is a version for 97. MS put together a sampling of neat things you can do in Access reports; specifically, they have a sample for exactly what you wanted to do in this post.
    <font face="Comic Sans MS"><font color=blue>~Shane</font color=blue></font face=comic>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •