Forum Statistics
- Forum Members:
- Total Threads:
- Total Posts: 20
There are 1 users currently browsing forums.
|
 |
|

05-22-2009, 02:02 PM
|
|
Registered User
|
|
Join Date: 20 May 2008
MS Office Version:2003 suite
Posts: 59
|
|
Sum in form footer (Access 2003)
Please Register to Remove these Ads
Hello again. Working with Access 2003.
I'm trying to put a running Sum into a Form Footer. I put the text box in the Form Footer and created this Expression in the Control Source:
Code:
=Sum([H0310]+[H0615]+[H0715]+[H1014]+[H1314]+[SS0312]+[SS0317]+[SS0619]+[SS0712]+[SS1012])
Where H0310, H0615, etc...are the Names of the fields.
I'm getting a #Error in the new text box.
The format of each fields control source is Number and the format of the new text box is General Number.
Any ideas?
Thanks!
Last edited by WillysK5; 05-26-2009 at 04:30 PM.
|

05-26-2009, 11:46 AM
|
|
Registered User
|
|
Join Date: 20 May 2008
MS Office Version:2003 suite
Posts: 59
|
|
|
Re: Sum in form footer (Access 2003)
Bumpity bump bump
Any help would be greatly appreciated!
|

05-26-2009, 12:22 PM
|
 |
Valued Forum Contributor
|
|
Join Date: 11 Mar 2009
Location: Victoria, Canada
MS Office Version:2003
Posts: 574
|
|
|
Re: Sum in form footer (Access 2003)
Hi WillysK5,
Try removing the Sum function so the control source looks like this:
Code:
=[H0310]+[H0615]+[H0715]+[H1014]+[H1314]+[SS0312]+[SS0317]+[SS0619]+[SS0712]+[SS1012]
Cheers,
__________________
Docendo discimus.
|

05-26-2009, 12:45 PM
|
|
Registered User
|
|
Join Date: 20 May 2008
MS Office Version:2003 suite
Posts: 59
|
|
|
Re: Sum in form footer (Access 2003)
Thanks Conne, but it just leaves it blank now. There's no #Error, but there's no total either.
WillysK5
|

05-26-2009, 01:14 PM
|
 |
Valued Forum Contributor
|
|
Join Date: 11 Mar 2009
Location: Victoria, Canada
MS Office Version:2003
Posts: 574
|
|
|
Re: Sum in form footer (Access 2003)
Is the form looking at an existing record (not a new record) with data in those fields?
__________________
Docendo discimus.
|

05-26-2009, 01:23 PM
|
|
Registered User
|
|
Join Date: 20 May 2008
MS Office Version:2003 suite
Posts: 59
|
|
|
Re: Sum in form footer (Access 2003)
Quote:
Originally Posted by ConneXionLost
Is the form looking at an existing record (not a new record) with data in those fields?
|
Both. The main function is as a running total in a new form, but it doesn't do that or show up in an existing record.
And yes, there are existing records for it to look at...
|

05-26-2009, 03:27 PM
|
|
Forum Contributor
|
|
Join Date: 23 Apr 2009
Location: Fredericksburg, IA
MS Office Version:Ultimate 2007
Posts: 126
|
|
|
Re: Sum in form footer (Access 2003)
Let me start with this is total speculation. There is no knowledge behind what I am about to say. If it sees the fields as being empty or null it won't give them a 0 value thus resulting in a Err or blank. Total guess, so take that for what it is worth, I would try the following.
Code:
=Nz([H0310],0)+Nz([H0615],0)+Nz([H0715],0)+Nz([H1014],0)+Nz([H1314],0)+Nz([SS0312],0)+Nz([SS0317],0)+Nz([SS0619],0)+Nz([SS0712],0)+Nz([SS1012],0)
Hope this helps,
Dan
__________________
"I am not a rocket scientist, I am a nuclear engineer." - Split_atom18
If my advice has been helpful to you, then please help me by clicking on the scales and adding to my reputation, Thanks!
|

05-26-2009, 03:34 PM
|
|
Registered User
|
|
Join Date: 20 May 2008
MS Office Version:2003 suite
Posts: 59
|
|
|
Re: Sum in form footer (Access 2003)
Thanks Dan, but that gives me an invalid syntax message.
I just wish I knew more about Access expressions.....
|

05-26-2009, 03:43 PM
|
 |
Valued Forum Contributor
|
|
Join Date: 11 Mar 2009
Location: Victoria, Canada
MS Office Version:2003
Posts: 574
|
|
|
Re: Sum in form footer (Access 2003)
Hi WillysK5,
I built a mock-up to test the formula, and it works fine, but that isn't helping here. The only way I can reproduce this error is by disconnecting the Record Source for the form (or by removing one of the Record Source fields).
Probably a dumb question, but do you still have a Record Source connected to the form?
Cheers,
__________________
Docendo discimus.
|

05-26-2009, 03:55 PM
|
|
Registered User
|
|
Join Date: 20 May 2008
MS Office Version:2003 suite
Posts: 59
|
|
|
Re: Sum in form footer (Access 2003)
Yeah. I have one table where all the data from that one form is stored. It's named in the Record Source of that form.
|

05-26-2009, 04:06 PM
|
|
Forum Contributor
|
|
Join Date: 23 Apr 2009
Location: Fredericksburg, IA
MS Office Version:Ultimate 2007
Posts: 126
|
|
|
Re: Sum in form footer (Access 2003)
Quote:
Originally Posted by ConneXionLost
Hi WillysK5,
I built a mock-up to test the formula, and it works fine, but that isn't helping here. The only way I can reproduce this error is by disconnecting the Record Source for the form (or by removing one of the Record Source fields).
Probably a dumb question, but do you still have a Record Source connected to the form?
Cheers,
|
I did a similar, however I got a blank when one of the fields was null, I may have screwed up the syntax. I am gonna try another thing quick.
__________________
"I am not a rocket scientist, I am a nuclear engineer." - Split_atom18
If my advice has been helpful to you, then please help me by clicking on the scales and adding to my reputation, Thanks!
|

05-26-2009, 04:11 PM
|
 |
Valued Forum Contributor
|
|
Join Date: 11 Mar 2009
Location: Victoria, Canada
MS Office Version:2003
Posts: 574
|
|
|
Re: Sum in form footer (Access 2003)
Hi WillysK5,
Okay, really grasping at straws now; any chance you used Captions in your table and are using them instead of the Field Names in the formula?
Note - I'm running out of guesses!
Cheers,
__________________
Docendo discimus.
|

05-26-2009, 04:25 PM
|
|
Forum Contributor
|
|
Join Date: 23 Apr 2009
Location: Fredericksburg, IA
MS Office Version:Ultimate 2007
Posts: 126
|
|
|
Re: Sum in form footer (Access 2003)
Code:
=Nz([H0310])+Nz([H0615])+Nz([H0715])+Nz([H1014])+Nz([H1314])+Nz([SS0312])+Nz([SS0317])+Nz([SS0619])+Nz([SS0712])+Nz([SS1012])
Try that,
I just checked it with mine, no syntax error, unless one of the field names if off on yours.
__________________
"I am not a rocket scientist, I am a nuclear engineer." - Split_atom18
If my advice has been helpful to you, then please help me by clicking on the scales and adding to my reputation, Thanks!
|

05-26-2009, 04:29 PM
|
|
Registered User
|
|
Join Date: 20 May 2008
MS Office Version:2003 suite
Posts: 59
|
|
|
Re: Sum in form footer (Access 2003)
Woohoo! That's it! I forgot a parenthesis.
Thanks!!
|

05-26-2009, 04:38 PM
|
 |
Valued Forum Contributor
|
|
Join Date: 11 Mar 2009
Location: Victoria, Canada
MS Office Version:2003
Posts: 574
|
|
|
Re: Sum in form footer (Access 2003)
Great!
So in your table, you might want to set the default values for those fields to zero "0" instead of blank.
Cheers,
__________________
Docendo discimus.
|
 |
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|