Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2005
    Posts
    4

    Exclamation Unanswered: Number rows in a query

    Hi. Im trying to add a column with the row number to a query... does anyone can help me with a commnad that allow me to do that (rownum, count, record()) or something like that

    Thanks!

  2. #2
    Join Date
    Feb 2004
    Location
    Canada
    Posts
    133
    I'm not sure about how to do it in a query but I've done it in a report using:

    =[Report].[CurrentRecord]

    in the controlsource of a textbox in the detail section. It is only useful for display purposes anyway. If you were to delete a record, for instance, the number in this textbox will change by one in all the subsequent records.

  3. #3
    Join Date
    Nov 2003
    Posts
    267
    Search MS Knowledgebase for qrysmp00.exe

    It has a sample doing what you are after (or at least something close)


    S-

  4. #4
    Join Date
    Feb 2005
    Posts
    4

    Still having the problem

    i've tried the options given for microsoft... but they dont work form me... actually , im using an autonumber field... but... how to compact the database with a macreo, in order to reset the autonumber to 1 each time i need it?

  5. #5
    Join Date
    Sep 2004
    Location
    Tampa, FL
    Posts
    520
    In newer version of Access ( beyond 2.0 I believe) compacting the DB will not reset the autonumber field.
    If you need to reset the autonumber field you need to drop the field then reinsert the field.
    Darasen

Posting Permissions

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