Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Mar 2001
    Location
    Dudley, Midlands, England
    Posts
    55
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Records visible in detail section (A2K)

    With a continous form, is there any way of telling which records are currently visible or, at least, which one is at the top and/or which at the bottom on the detail display area?

    Thanks,

    Simon

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

    Re: Records visible in detail section (A2K)

    Try the following. It's not very elegant. If somebody has better solutions, please post them.

    To get the record number of the top visible record:

    Me.CurrentRecord - Int(Me.CurrentSectionTop / Me.Section(acDetail).Height + 0.5) + 1

    To get an approximation of the number of records that is visible (in a resizable form, the number of visible records is not an integer):

    (Me.InsideHeight - Me.Section(acHeader).Height - Me.Section(acFooter).Height) / Me.Section(acDetail).Height

    If your form doesn't have a header/footer, omit
    - Me.Section(acHeader).Height - Me.Section(acFooter).Height

  3. #3
    Star Lounger
    Join Date
    Mar 2001
    Location
    Dudley, Midlands, England
    Posts
    55
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Records visible in detail section (A2K)

    Thanks a lot.

    The first part of your answer does rely on the current record being visible and not having been scrolled outside the viewing area (which isn't that likely, but is possible) but it's a neat idea, thanks.

    Simon.

Posting Permissions

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