Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2004
    Location
    Myanmar (Burma)
    Posts
    42

    Red face Unanswered: Help NeeD... Adding serial number of the row in a form.

    I want to put the serial number of each row in the query form and report and also want to show the total number of the row on the report header.
    But I don't know how to do.
    Pls. advice and help me.

    Thanks in advance.

    mmlatt
    Last edited by mmlatt; 02-18-04 at 03:12.

  2. #2
    Join Date
    Jun 2003
    Location
    USA
    Posts
    1,032
    Here's something I put together about showing record numbers which hopefully might give you some ideas.

    To get the current rec num on a form, you could have the form's OnCurrent property set a control (perhaps called txtRecNum) to be equal to Me.CurrentRecord.

    But for a continuous form sorted on a field called idea, you could have the rec num control do a DCount of all recs in the form's record source that are <= to the cur rec's ID. But of course DCount's are resource intensive.

    And the count of all the recs can be =DCount("*", "MyQuery"). Count doesn't get updated on a Refresh (but does on a Requery - but a Requery puts the user on the first rec).

    And need to use Me.Refresh (or Me.Requery) where appropriate such as OnCurrent.

    And for a report can use a control with =1 and RunningSum property set to be Yes.
    J. Paul Schmidt, Freelance Web and Database Developer
    www.Bullschmidt.com
    Access Database Sample, Web Database Sample, ASP Design Tips

  3. #3
    Join Date
    Jan 2004
    Location
    Myanmar (Burma)
    Posts
    42

    Smile

    Thanks you Bullschmidt
    Cyber : The easiest place to make huge mistake.

  4. #4
    Join Date
    Jun 2003
    Location
    USA
    Posts
    1,032
    You're welcome mmlatt.
    J. Paul Schmidt, Freelance Web and Database Developer
    www.Bullschmidt.com
    Access Database Sample, Web Database Sample, ASP Design Tips

Posting Permissions

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