Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    Oct 2001
    Location
    San Bernardino, California, USA
    Posts
    734
    Thanks
    0
    Thanked 0 Times in 0 Posts

    showing the record number (XP,2000)

    I am trying to show the record number in a text box on a form - not sure if this is possible as I have tried to use an unbound textbox with the ControlSource property set to =[CurrentRecord]. I have also tried a couple of other things but I always get a #ERROR in my text box instead of the appropriate record number. I need this for display only as I am trying to simulate line numbers or item numbers on a continuous subform.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: showing the record number (XP,2000)

    See MSKB article ACC2000: How to Display Line Numbers on Subform Records for a method to display line numbers on a continuous (sub)form.

  3. #3
    5 Star Lounger
    Join Date
    Oct 2001
    Location
    San Bernardino, California, USA
    Posts
    734
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: showing the record number (XP,2000)

    Thanks Hans. Question though, I am currently using the line below as the Control Source for an unbound text box in my navigational cluster to show record X of Y. Why doesn't it work in any text box? As I mentioned, using =[CurrentRecord] results in an error.

    ="Record " & [CurrentRecord] & " of " & RecordSet.RecordCount

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: showing the record number (XP,2000)

    I don't know why you get #Error. I get "Record 1 of 37" where 37 is the number of records, but this is not very useful, since this same text is displayed in ALL records of the continuous (sub)form. This is because there is only one set of controls on a continuous form. Only controls displaying (expressions based on) fields from the record source vary from record to record. That is why you need a technique such as the one described in the MSKB article I referred to.

  5. #5
    5 Star Lounger
    Join Date
    Oct 2001
    Location
    San Bernardino, California, USA
    Posts
    734
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: showing the record number (XP,2000)

    okay, I finally get it. Thanks for your patience.

Posting Permissions

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