Calculating totals from a sub form to a main form

A

Allie

Hi All,

I have two forms both feeding from 2 different tables.
The main form is a summary of the sub form, which is a
datasheet. For example, on a given date a person can have
up to 50 entries in the sub form and these entries must be
summarized on the main form.

Main form: total transactions, total minutes used, total
issues, total declines

sub form: as an entry is made here it adds 1 to the total
transactions; add how many minutes it took to perform the
transaction to total minutes used (each transaction has X
number of minutes);then if the transaction was a decline
it would add 1 to the total number of declines.

I am trying to use a recordset on the subform to tie the
information back to the main form but I am not getting it
to work.

Please help

Thanks
 
K

Kevin Sprinkel

-----Original Message-----
Hi All,

I have two forms both feeding from 2 different tables.
The main form is a summary of the sub form, which is a
datasheet. For example, on a given date a person can have
up to 50 entries in the sub form and these entries must be
summarized on the main form.

Main form: total transactions, total minutes used, total
issues, total declines

sub form: as an entry is made here it adds 1 to the total
transactions; add how many minutes it took to perform the
transaction to total minutes used (each transaction has X
number of minutes);then if the transaction was a decline
it would add 1 to the total number of declines.

I am trying to use a recordset on the subform to tie the
information back to the main form but I am not getting it
to work.

Please help

Thanks

Place summary fields in your subform footer, make them
invisible, and refer to them in controls of the main form,
e.g., if your subform is named "sbfDetail" and main form
is "frmMain", and your subform summary control for minutes
is named txtSumofMinutes, the main form control source is:

= Me![sbfDetail].Form![txtSumofMinutes]

HTH
Kevin Sprinkel
 

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