How to count the number of records in the detail section with VBA?

T

Tec92407

How do I count the number of records in the detail section with VBA and refer
to the number in the detail footer section using VBA?
 
A

Alp Bekisoglu

I'm no expert but, try an unbound textBox (say txtBox1) at the detail
section with:
Control Source set as =1
Running Sum set to Over All

Then you can Put another unbound textBox in the section footer or report
footer (no detail footer as far as I know) and set its Control Source to
Sum(txtBox1).

Thus, no VBA needed.

Hope it helps.

Alp
 
A

Alp Bekisoglu

Sorry about the earlier post. The xtxBox1 will give you a sequential count
of your detail records.
For the Total, you can use an unbound txtBox in report footer and use
Count([AFieldnameInDetailSection]) refering to a field at the detail
section.
:-(

Alp
 
Top