• Records visible in detail section (A2K)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Records visible in detail section (A2K)

    Author
    Topic
    #372630

    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

    Viewing 0 reply threads
    Author
    Replies
    • #596202

      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

      • #596399

        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.

    Viewing 0 reply threads
    Reply To: Records visible in detail section (A2K)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: