+ Reply to Thread
Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20

Thread: Sum in form footer (Access 2003)

  1. #16
    Registered User
    Join Date
    05-20-2008
    MS-Off Ver
    2003 suite
    Posts
    64

    Re: Sum in form footer (Access 2003)

    Actually, it works well without the '0' in the syntax and set as 'blank'. Were you looking at the '0's in split's first post?

  2. #17
    Valued Forum Contributor
    Join Date
    04-23-2009
    Location
    IOWA
    MS-Off Ver
    2010 Professional
    Posts
    270

    Re: Sum in form footer (Access 2003)

    What he meant was not in the form itself, or in that equation. He meant if you go to the table and select design mode, and go to the fields you are adding together, set their default value to 0. That way when you don't enter in a value they already have a 0.

    All "Nz([Field])" does is if the field is "Null" then it returns 0 for the purpose of calculating. It fixes the current issue, but down the road you may have an issue you have to use Nz for if you leave them "Null".

    Disclaimer, this is what I think he meant

    P.S. Sorry for "hi-jacking" you helping him ConneXionLost.

    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 "Star" and adding to my reputation, Thanks!

  3. #18
    Forum Guru ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    traded up
    MS-Off Ver
    2003 & 2010
    Posts
    1,905

    Re: Sum in form footer (Access 2003)

    That is exactly what I meant; good read split!

    BTW - I don't consider what you did as "hi-jacking". I'm happy to be sharing neurons with you.

    Cheers,
    “To sin by silence when they should protest makes cowards of men.” ~ Abraham Lincoln

  4. #19
    Registered User
    Join Date
    06-22-2009
    Location
    Port St. Lucie
    MS-Off Ver
    Access 2003
    Posts
    1

    Re: Sum in form footer (Access 2003)

    Desperate Need been trying to find it out for hours now!

    Please help. In Access 2003 I am trying to calculate a sum of all records of a specific field. I have bound the field and unbound the field. I am able to place a specific value in the field but not able to get a sum of the values on my form footer as a total. I keep getting an

    The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure]
    There may have been an error evaluating the function, event, or macro.

    Code With Bound Field to Table Field:
    'Private Sub Text75_Change()
    'Me.Text75.OnChange
    'Me.InputParameters (Sum(ChangeOrders.PendingFundedAmount))
    'End Sub

    'Private Sub Text75_Click()
    'Me.Text75 = "2000"
    'End Sub

    'Private Sub Text75_Exit(Cancel As Integer)
    'Me.Text75 = "10000"
    'End Sub

    Private Sub Text75_Change(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Me.DataEntry = False
    Me.Text75 = Sum([ChangeOrders].[PendingFundedAmount])
    End Sub

    When I try the other route unbound I am getting a sub or function not defined:

    Private Sub Text75_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Me.DataEntry = False
    Me.Text75 = Sum(Pending2FundedAmount)
    End Sub

  5. #20
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2007, 2010
    Posts
    25,735

    Re: Sum in form footer (Access 2003)

    Armyguy,

    Please take a few minutes to read the forum rules, and then start your own thread, with your code wrapped in code tags.
    Microsoft MVP - Excel
    Entia non sunt multiplicanda sine necessitate

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0