expression to 0?

cikwan82

Registered User.
Local time
Tomorrow, 01:08
Joined
Dec 10, 2013
Messages
45
Hello all my friend, i already have a form which the value of time is total for this expression =CCur([Masa1])+CCur([Masa2])+CCur([Masa3])+CCur([Masa4])+CCur([Masa5])+CCur([Masa6])+CCur([Masa7])+CCur([Masa8])

the problem is, i must put time value for each every box to get the total value..if not, the answer not appear...how to make the total value also appear if we just fill not full data .... i try to change the coding something like this

=CCur([Masa1+0])+CCur([Masa2+0])+CCur([Masa3+0])+CCur([Masa4+0])+CCur([Masa5+0])+CCur([Masa6+0])+CCur([Masa7+0])+CCur([Masa8+0])

or this

=CCur([Masa1*0])+CCur([Masa2*0])+CCur([Masa3*0])+CCur([Masa4*0])+CCur([Masa5*0])+CCur([Masa6*0])+CCur([Masa7*0])+CCur([Masa8*0])


but the total value is going like this #Name?


i already put =0 as a default value for every Masa textbox , it is working, but if can i want make sure textbox Masa not fill any default number.. any idea?
 
The NZ function will work but possibly (re)consider your design... in a lot of situations having fieldnames like Masa1, Masa2, etc is a sign of a badly designed database.
 
Here i attach the example of simple form.. its working if i put =0 as a default value for every time box.. it is possible if i not put any default value (=0)?.
where null value must i put.. please teach me... i 'm very newbies in access. :confused:
 

Attachments

Attachments

If you cant read, then what are you doing on the forum?
Go to the link and find out how the NZ function works and apply the function to your situation
 
ok.. thank you.. finally i got what do u mean... :)

=CCur(Nz([Masa1],"0"))+CCur(Nz([Masa2],"0"))+CCur(Nz([Masa3],"0"))+CCur(Nz([Masa4],"0"))+CCur(Nz([Masa5],"0"))+CCur(Nz([Masa6],"0"))+CCur(Nz([Masa7],"0"))+CCur(Nz([Masa8],"0"))
 
I would personally do away with the quotes, since qoutes turn things into STRINGS instead of numbers.... Numbers is what you need to calculate ...
 

Users who are viewing this thread

Back
Top Bottom