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

G

Guest

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
 

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