Showing totals

G

Guest

I have a continuous form, the detail section of which will show from one to
fifteen or so lines depending on the record filtered. I have totals in the
form footer. What I want is for those totals to show right after the lines
in the detail section, not at the bottom of the screen. When I put them in
the detail section, I end up with a total line after each line – I only want
one total line. How do I accomplish this?
 
M

Marshall Barton

Erin said:
I have a continuous form, the detail section of which will show from one to
fifteen or so lines depending on the record filtered. I have totals in the
form footer. What I want is for those totals to show right after the lines
in the detail section, not at the bottom of the screen. When I put them in
the detail section, I end up with a total line after each line – I only want
one total line. How do I accomplish this?


AFAIK, not in any resonable way.

The form header/footer is the place for aggregate values.
The detail section if for the data in each record.

One off the wall thought is to adjust the form's height, up
to a resonable limit, so that footer is near the last
detail.
 
G

Guest

Ok. Where would I do that? I see a width option in the form properties but
not a height option.
 
M

Marshall Barton

Create a Sub procedure in the form's module:

Sub AdjustForm()
With Me.RecordsetClone
.MoveLast
Me.InsideHeight = Me.Section(1).Height _
+ Me.Section(2).Height _
+ (.RecordCount + 1) * Me.Section(0).Height
End With
End Sub

Then call the procedure in the form's Load and AfterInsert
events.
 

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