Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Reverse Counter (A2000 SR1)

    This code below populates an unbound text [txtRecordCount] into a record counter.
    My table index is set to descending to show the most current record created.
    When opening the form, the counter shows : 1 - 79 instead of 79 - 79.
    Can this code be altered to show as my index, descending.
    Regards
    Dave


    Dim rst As Object
    Set rst = Me.RecordsetClone
    rst.MoveLast
    rst.MoveFirst
    Me.txtRecordCount = "" & Me.CurrentRecord & " - " & rst.RecordCount

  2. #2
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Edmonton, Alberta, Canada
    Posts
    326
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Reverse Counter (A2000 SR1)

    I don't know of a way to access an index in the way you describe, but rather than fight with indices, why not just use an expression similar to

    ...
    Me.txtRecordCount = (rst.RecordCount - Me.CurrentRecord + 1) & "-" & rst.RecordCount

    to get it to count backwards?

  3. #3
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Reverse Counter (A2000 SR1)

    Thanks Douglas
    Thats exactly what I wanted it to do.
    Regards
    Dave

Posting Permissions

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