Floating total sum amount field

  • Thread starter nigelb via AccessMonster.com
  • Start date
N

nigelb via AccessMonster.com

I´m using Access 2003 and have a form with a detail section that shows
between 0 to 8 records. Each record shows an expense name and amount, and the
content and number of records can be modified by the user. I also have a
total sum field (on the footer section) located in the same column position
as the amount fields. What I would really like is for the total sum to float
with the detail section so that the total sum field always appears directly
underneath the last detail record.

Is this possible? Any ideas...?
 
A

Allen Browne

Access does not provide a way to do that. It would be possible (though
messy) with API calls and a popup (non-modal) form.

Or, it may be possible to just use the ControlTipText of your Amount text
box. You would need to update this property (using a DSum()) in the Current
event of the main form, and the AfterUpdate and AfterDelConfirm events of
the subform.
 
N

nigelb via AccessMonster.com

Thanks for your advice Allen. I actually tried coding an adjustable height
function for the footer based on the number of records shown in the detail
section, and this worked... to a certain extent... that is until I needed to
add a new record, and the code just got a bit messy in the end trying to
handle all the possibilities of adding, editing, and removing detail records
to keep the height of the footer correct. So I removed the function
altogether. I like your suggestion of using the ControlTipText property, but
I think I'll continue to use the total sum field as well (even if it is
locked in one position).

Thanks again.

Allen said:
Access does not provide a way to do that. It would be possible (though
messy) with API calls and a popup (non-modal) form.

Or, it may be possible to just use the ControlTipText of your Amount text
box. You would need to update this property (using a DSum()) in the Current
event of the main form, and the AfterUpdate and AfterDelConfirm events of
the subform.
I´m using Access 2003 and have a form with a detail section that shows
between 0 to 8 records. Each record shows an expense name and amount, and
[quoted text clipped - 7 lines]
directly
underneath the last detail record.
 

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