Subform Total on Main form error

verdes

Registered User.
Local time
Yesterday, 23:48
Joined
Sep 10, 2012
Messages
49
I'm using Access 2007

i have a mainform that has 2 page controls.

Each page has a subform with a calculated sum of an amount field in the footer.

I wrapped each subform calculation in an Nz. All total fields are formatted as currency.

the totals display correctly on the main form, until.......

I add text in the description field on either subform. IWhen I do that I get #error on the corresponding total field.


if I erase the text in the description field and retype a couple of the amounts, the error goes away and the correct total is displayed.

Any thoughts?
 
What is the controlsource for the Total field/control?
 
The control source for the total field in the footer of the subforms is

= SUM(Nz([field name]))

The control source for the total fields on the main form is

= subformname.Form!controlnameofthesubformfootertotal

I can make a zipped copy of the db if that will help
 
I add text in the description field on either subform. IWhen I do that I get #error on the corresponding total field.
Well, you can't add up(Sum) text, so the Sum() function returns an error.
 
I'm sorry I wasn't clear. Description is a separate field that does not have any calculations on it. I'll check it to make sure it doesn't have the same name as one of the calculated fields or the amount fields.

But I'm pretty sure it has a unique name. I'll send the database.
 
I've attached my database.

The form titled frmEOV displays the correct totals on the main form.

If you add data in the description fields on the records listed on either "donation" subform you get an error in the totals on the main form.

Sometimes I get the error as I'm tryping. Sometimes I get it after I type descriptions, close the form and then reopen it.

I appreciate your time.

I'll check and see if I have any onload code - but I don't think I do.

Thanks again.
 

Attachments

Can you attach a version in A2003 mdb format
 
I did have an onload event.

I removed the event (deleted the rows in the event, then erased the "Embedded Macro" from the onload event.

Now, i am able to add numerical values to the description field and it works ok. But as soon as I add a non-numeric value - I get the error.

I can eliminate the error by erasing the description......

Still need help...

Thanks
 
I saved the database in 2000-2003 format.

It seems as if the field called description on the subforms is effecting the calculated totals on the main form (which seems illogical because the calculated values are correct).

If I enter a numeric value in the description field (Auxiliary Donation) I don't get an error in the calculated totals.

If I enter a non-numeric value in the description field (Individual Donation) I do get an error in the calculated totals.

If you erase the non-numeric descriptions, close, and reopen the form, the error will go away.

You don't see the error until you close the form and reopen it.

Your help is appreciated.
 

Attachments

I deleted the description fields and added them back in with the text box contol wizard (?) and it seems to be working fine.

Thanks for your help.
 

Users who are viewing this thread

Back
Top Bottom