Results 1 to 4 of 4

Thread: Record counter

  1. #1
    Lounger
    Join Date
    Apr 2001
    Location
    Sacramento, California, USA
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Record counter

    I'm attempting to write a series of queries that will "count" the number of records returned, and create a number, in a column in the result set (an incrementally increasing number). Is there an easy way to do that?
    Thanks!
    Lance

  2. #2
    Lounger
    Join Date
    Apr 2001
    Location
    Sacramento, California, USA
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Record counter

    Nevermind, I think I figured out a way to solve my problem!
    Thanks anyway!
    Lance

  3. #3
    LuiGreco
    Guest

    Re: Record counter

    How did you get this to work? I'm looking to do the same sort of thing and am not having any luck.

    I tried using count in the query but all I get is 1 and not the total count of records.
    Thanks.

  4. #4
    Lounger
    Join Date
    Apr 2001
    Location
    Sacramento, California, USA
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Record counter

    Well, I actually didn't get the record counter to show.
    What I really wanted is only a certain number of values. I thought a record counter would be the way to go.
    However I found another way to accomplish what I wanted.

    In access there is a query property called "top values" I only wanted the 250 values to be returned for my query, so I set the "top values" property to 250. I also wanted a random selection of records. So, using a technique I found in Woody's Access Watch, I created a calculated value called RandomID as follows "randomID: Rnd([fieldnamex])" and I sorted the results in ascending order. I felt that would give me a random sorting of 250 values from the table. So, I got the results I was looking for without having to add a record counter to the results.

Posting Permissions

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