Welcome to the Excel Forum

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Please Register to Remove these Ads

Please Register to Remove these Ads



Reply
  #1  
Old 05-22-2009, 02:02 PM
WillysK5 WillysK5 is offline
Registered User
 
Join Date: 20 May 2008
MS Office Version:2003 suite
Posts: 59
WillysK5 is becoming part of the community
Question 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.
Reply With Quote
  #2  
Old 05-26-2009, 11:46 AM
WillysK5 WillysK5 is offline
Registered User
 
Join Date: 20 May 2008
MS Office Version:2003 suite
Posts: 59
WillysK5 is becoming part of the community
Re: Sum in form footer (Access 2003)

Bumpity bump bump

Any help would be greatly appreciated!
Reply With Quote
  #3  
Old 05-26-2009, 12:22 PM
ConneXionLost's Avatar
ConneXionLost ConneXionLost is offline
Valued Forum Contributor
 
Join Date: 11 Mar 2009
Location: Victoria, Canada
MS Office Version:2003
Posts: 574
ConneXionLost is attaining expert status ConneXionLost is attaining expert status
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.
Reply With Quote
  #4  
Old 05-26-2009, 12:45 PM
WillysK5 WillysK5 is offline
Registered User
 
Join Date: 20 May 2008
MS Office Version:2003 suite
Posts: 59
WillysK5 is becoming part of the community
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
Reply With Quote
  #5  
Old 05-26-2009, 01:14 PM
ConneXionLost's Avatar
ConneXionLost ConneXionLost is offline
Valued Forum Contributor
 
Join Date: 11 Mar 2009
Location: Victoria, Canada
MS Office Version:2003
Posts: 574
ConneXionLost is attaining expert status ConneXionLost is attaining expert status
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.
Reply With Quote
  #6  
Old 05-26-2009, 01:23 PM
WillysK5 WillysK5 is offline
Registered User
 
Join Date: 20 May 2008
MS Office Version:2003 suite
Posts: 59
WillysK5 is becoming part of the community
Re: Sum in form footer (Access 2003)

Quote:
Originally Posted by ConneXionLost View Post
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...
Reply With Quote
  #7  
Old 05-26-2009, 03:27 PM
split_atom18 split_atom18 is offline
Forum Contributor
 
Join Date: 23 Apr 2009
Location: Fredericksburg, IA
MS Office Version:Ultimate 2007
Posts: 126
split_atom18 Has established their mark in the community
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!
Reply With Quote
  #8  
Old 05-26-2009, 03:34 PM
WillysK5 WillysK5 is offline
Registered User
 
Join Date: 20 May 2008
MS Office Version:2003 suite
Posts: 59
WillysK5 is becoming part of the community
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.....
Reply With Quote
  #9  
Old 05-26-2009, 03:43 PM
ConneXionLost's Avatar
ConneXionLost ConneXionLost is offline
Valued Forum Contributor
 
Join Date: 11 Mar 2009
Location: Victoria, Canada
MS Office Version:2003
Posts: 574
ConneXionLost is attaining expert status ConneXionLost is attaining expert status
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.
Reply With Quote
  #10  
Old 05-26-2009, 03:55 PM
WillysK5 WillysK5 is offline
Registered User
 
Join Date: 20 May 2008
MS Office Version:2003 suite
Posts: 59
WillysK5 is becoming part of the community
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.
Reply With Quote
  #11  
Old 05-26-2009, 04:06 PM
split_atom18 split_atom18 is offline
Forum Contributor
 
Join Date: 23 Apr 2009
Location: Fredericksburg, IA
MS Office Version:Ultimate 2007
Posts: 126
split_atom18 Has established their mark in the community
Re: Sum in form footer (Access 2003)

Quote:
Originally Posted by ConneXionLost View Post
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!
Reply With Quote
  #12  
Old 05-26-2009, 04:11 PM
ConneXionLost's Avatar
ConneXionLost ConneXionLost is offline
Valued Forum Contributor
 
Join Date: 11 Mar 2009
Location: Victoria, Canada
MS Office Version:2003
Posts: 574
ConneXionLost is attaining expert status ConneXionLost is attaining expert status
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.
Reply With Quote
  #13  
Old 05-26-2009, 04:25 PM
split_atom18 split_atom18 is offline
Forum Contributor
 
Join Date: 23 Apr 2009
Location: Fredericksburg, IA
MS Office Version:Ultimate 2007
Posts: 126
split_atom18 Has established their mark in the community
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!
Reply With Quote
  #14  
Old 05-26-2009, 04:29 PM
WillysK5 WillysK5 is offline
Registered User
 
Join Date: 20 May 2008
MS Office Version:2003 suite
Posts: 59
WillysK5 is becoming part of the community
Re: Sum in form footer (Access 2003)

Woohoo! That's it! I forgot a parenthesis.

Thanks!!
Reply With Quote
  #15  
Old 05-26-2009, 04:38 PM
ConneXionLost's Avatar
ConneXionLost ConneXionLost is offline
Valued Forum Contributor
 
Join Date: 11 Mar 2009
Location: Victoria, Canada
MS Office Version:2003
Posts: 574
ConneXionLost is attaining expert status ConneXionLost is attaining expert status
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.
Reply With Quote


Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump