count visible records only on continuous forms

  • Thread starter Thread starter MPM1100
  • Start date Start date
M

MPM1100

I would like to programmitically count # of visible records/rows in a
continuous forms or datasheet format. So, I may have 200 records as the
total recordcount in my recordset, but, I want to know how many are actually
visible in the window.

The reason for this is that I am basing the size of a subform's height,
which contains continuous forms, on the window height. I want to be able to
determine the top record displayed and the last record displayed. Again,
this is regardless of how many actuall records exist in the recordcount.

Any help is appreciated.
 
MPM1100 said:
I would like to programmitically count # of visible records/rows in a
continuous forms or datasheet format. So, I may have 200 records as the
total recordcount in my recordset, but, I want to know how many are actually
visible in the window.

The reason for this is that I am basing the size of a subform's height,
which contains continuous forms, on the window height. I want to be able to
determine the top record displayed and the last record displayed. Again,
this is regardless of how many actuall records exist in the recordcount.


You can get the number of records a subform can display with
a formula like:

Me.InsideHeight - Me.Section(1).Height -
Me.Section(2).Height) / Me.Section(0).Height

If the form does not have the form header/footer sections,
drop those terms.

For the record numbers being displayed, try using the code
at http://www.lebans.com/setgetsb.htm
 
Back
Top