Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Feb 2002
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Record Number (A2000)

    On the bottom of a form, it shows the amount of records in the table.
    If its filtered, it will show only the filtered ones.
    I am running a filter much the same but here's what I want to do.
    An unbound textbox showing amount filtered with a twist.
    =Count([LastName]) does the trick but.
    If I have buttons so I can scroll ie "go to next" or "go to last" etc, can the unbound change its number.

    E.g

    The filter on LastName produces 3 Names of "Willett" (Obviously if there are 3 in the table)
    The text shows "3"
    When moving backwards thru the filter I want it to Read "3" "2" "1" or forwards "1" "2" "3" etc

    Does this make sense

    Dave

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Record Number (A2000)

    In the code of the form enter the following function:
    <pre>Function lngPosition() as long
    lngPosition = Me.Recordset.AbsolutePosition + 1
    End Function</pre>

    In the control source of the unbound textbox:
    =lngPosition()
    Francois

  3. #3
    Star Lounger
    Join Date
    Feb 2002
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Record Number (A2000)

    Francois
    Thanks, its perfect
    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
  •