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?
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!
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
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
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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks