Show Running total of an Amount in a subform

  • Thread starter Thread starter PC
  • Start date Start date
P

PC

Hi,

I'm looking for a way to show the running total of the numberical values
entered in an [Amount] field in a subform.

To Explain:

I have a Form called frmForm1 with a sub form called sfrmSubForm1 (This sub
form is in Datasheet format). There is a one-to-many relationship between
these forms (and the underlying tables). sfrmSubForm1 can have any number of
records related to the Primary key of frmForm1. One of the fields in
sfrmSubForm1 is an [Amount] field.

I want to display a running total in a text box (txtRunningTotal) in
frmFrom1 of the values entered into the Amount field in sfrmSubFrom1. I've
tried
=Sum([sfrmSubForm1].Form![Amount] ) but this returns and error (#Error).

Any suggestions would be appreciated

Paul
 
Hi Paul,

I have a tutorial that I can send you on this very topic. Would you care to receive a .zip file,
which includes a Word document and an Access 2000 database?

Tom
_________________________________


Hi,

I'm looking for a way to show the running total of the numberical values
entered in an [Amount] field in a subform.

To Explain:

I have a Form called frmForm1 with a sub form called sfrmSubForm1 (This sub
form is in Datasheet format). There is a one-to-many relationship between
these forms (and the underlying tables). sfrmSubForm1 can have any number of
records related to the Primary key of frmForm1. One of the fields in
sfrmSubForm1 is an [Amount] field.

I want to display a running total in a text box (txtRunningTotal) in
frmFrom1 of the values entered into the Amount field in sfrmSubFrom1. I've
tried
=Sum([sfrmSubForm1].Form![Amount] ) but this returns and error (#Error).

Any suggestions would be appreciated

Paul
 
you might need to sum the subform records from within the subform itself.
(you can do this with an unbound textbox control in the subform's footer
section, and make the control invisible if you wish. then just reference the
name of the subform's unbound textbox in txtRunningTotal on the main form.)

before going that route, suggest you double check the reference you're using
now in the Sum() function. the name of a subform (what you see in the
database window) is not always the same as the name of the *subform control*
in the main form. you need to use the name of the subform control in the
reference. to get the correct name: open the form in design view, click
once on the subform *within in the main form* to select it; in the
Properties box, click the Other tab and look at the Name property.

hth
 
Hi Tom,

Yep, if you have a tutorial I love to read through it. Could you send it to
paulm.c at dublin dot com

Thanks

Paul
 
Hi Paul,

I just sent it. Let me know if you don't receive it for any reason.

Tom
__________________________________


Hi Tom,

Yep, if you have a tutorial I love to read through it. Could you send it to
paulm.c at dublin dot com

Thanks

Paul

__________________________________
 
Tom:
Is this .zip posted anywhere for download? If not, could you also send
it to me at srockower at comcast dot net?

Thanks

Steve
 
Hi Steve,

This sample is not available for download at the present time. It may be in the future. I have
sent it to a friend of mine who owns QBuilt.com, so we'll see if it gets posted. At the present
time, I do not maintain a web page of my own.

I just sent you a copy.

Tom
_____________________________

Tom:
Is this .zip posted anywhere for download? If not, could you also send
it to me at srockower at comcast dot net?

Thanks

Steve
 
We regret to inform you that the Technical Editor still hasn’t updated the
Web site this weekend because the Technical Editor has been too busy doing
system administrator duties for the last few days, like networking a gaggle
of computers, creating E-mail accounts, installing software, and installing
Windows updates and Office updates. The networking, E-mail accounts, and
other software installations went off with only three hitches – which were
quickly fixed – but nothing has worked to solve the Microsoft updates’
installation problems, so now a re-install and re-activation of Office 2003
is necessary so we can start all over – and try to install these updates yet
again.

And then the Technical Editor can work on the fun stuff.

Warmest regards – and may a few bottles of Tobasco sauce find their way into
the favorite beverage of the person responsible for Microsoft’s online
updates the next time any of us sees him at the Redmond campus.

Gunny
 
Hi Tom

I am having the same problem that Paul is having. Could you also send the
zip file to me as well. My email is (e-mail address removed). Thank you.

Tom Wickerath said:
Hi Paul,

I just sent it. Let me know if you don't receive it for any reason.

Tom
__________________________________


Hi Tom,

Yep, if you have a tutorial I love to read through it. Could you send it to
paulm.c at dublin dot com

Thanks

Paul

__________________________________

Tom Wickerath said:
Hi Paul,

I have a tutorial that I can send you on this very topic. Would you care
to receive a .zip file,
which includes a Word document and an Access 2000 database?

Tom
_________________________________


Hi,

I'm looking for a way to show the running total of the numberical values
entered in an [Amount] field in a subform.

To Explain:

I have a Form called frmForm1 with a sub form called sfrmSubForm1 (This
sub
form is in Datasheet format). There is a one-to-many relationship between
these forms (and the underlying tables). sfrmSubForm1 can have any number
of
records related to the Primary key of frmForm1. One of the fields in
sfrmSubForm1 is an [Amount] field.

I want to display a running total in a text box (txtRunningTotal) in
frmFrom1 of the values entered into the Amount field in sfrmSubFrom1. I've
tried
=Sum([sfrmSubForm1].Form![Amount] ) but this returns and error (#Error).

Any suggestions would be appreciated

Paul
 
Hi Paulina,

I just noticed your message, since it was a reply to a post that hasn't been
active since mid-February. I will send you the same sample shortly.

I do not recommend posting your e-mail address in any newsgroup post. This
is a great way to make it onto the lists of many spammers. A better way to
post an e-mail address is to obfuscate it, so that only a human can likely
piece it back together. For example, if one's e-mail address is:
(e-mail address removed), it could be masked something like this:
(e-mail address removed) (remove capitol letters).

Tom
____________________________________

:

Hi Tom

I am having the same problem that Paul is having. Could you also send the
zip file to me as well. My email is <snip>. Thank you.
 

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

Back
Top