count visible records only on continuous forms

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.
 
M

Marshall Barton

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top