U Unicon Registered User. Local time Today, 03:22 Joined Dec 24, 2009 Messages 123 Jan 19, 2011 #1 Dear all, Please advise re attachment as I want to show total values in Total earnings and write down the feild with (+) but it is not working. It is working only in the condition if whole feild is filled up with value. Might be I am doing wrong. Help me out. Attachments Q2.JPG 53.6 KB · Views: 106
Dear all, Please advise re attachment as I want to show total values in Total earnings and write down the feild with (+) but it is not working. It is working only in the condition if whole feild is filled up with value. Might be I am doing wrong. Help me out.
C CBrighton Surfing while working... Local time Today, 00:22 Joined Nov 9, 2010 Messages 1,012 Jan 19, 2011 #2 Code: Nz([FieldName],0) This will replace any null values with zero, which should allow the calculated field to work correctly. Use the above code for each field reference within your Total Earnings field.
Code: Nz([FieldName],0) This will replace any null values with zero, which should allow the calculated field to work correctly. Use the above code for each field reference within your Total Earnings field.
John Big Booty AWF VIP Local time Today, 09:22 Joined Aug 29, 2005 Messages 8,262 Jan 19, 2011 #3 Perhaps a Totals Query is what you are looking for.
U Unicon Registered User. Local time Today, 03:22 Joined Dec 24, 2009 Messages 123 Jan 19, 2011 #4 Thanks CBrighton, No idea where I can put that code. Please advise.
C CBrighton Surfing while working... Local time Today, 00:22 Joined Nov 9, 2010 Messages 1,012 Jan 19, 2011 #5 In your calculated field, instead of just adding up the fields add the fields within their own Nz functions: Code: Total Earnings: (Nz([Basic Salary],0)+Nz([Food],0)+Nz([Normal OT],0)+Nz([Weekly Off OT],0)+Nz([Monthly Performance],0)+Nz([Site Allowance],0)) Forgive any typos in field names, screen-print is bad quality or my browser is stretching it out of shape. Last edited: Jan 19, 2011
In your calculated field, instead of just adding up the fields add the fields within their own Nz functions: Code: Total Earnings: (Nz([Basic Salary],0)+Nz([Food],0)+Nz([Normal OT],0)+Nz([Weekly Off OT],0)+Nz([Monthly Performance],0)+Nz([Site Allowance],0)) Forgive any typos in field names, screen-print is bad quality or my browser is stretching it out of shape.
U Unicon Registered User. Local time Today, 03:22 Joined Dec 24, 2009 Messages 123 Jan 19, 2011 #6 Received below message, The expression you entered contains invalid syntax You may have entered and operand without an operator
Received below message, The expression you entered contains invalid syntax You may have entered and operand without an operator
C CBrighton Surfing while working... Local time Today, 00:22 Joined Nov 9, 2010 Messages 1,012 Jan 19, 2011 #7 See attachment. qryQuery has 5 currency fields, Total1 field uses a straight sum, Total2 uses a sum with Nz. Attachments db7.mdb db7.mdb 152 KB · Views: 77
See attachment. qryQuery has 5 currency fields, Total1 field uses a straight sum, Total2 uses a sum with Nz.
U Unicon Registered User. Local time Today, 03:22 Joined Dec 24, 2009 Messages 123 Jan 19, 2011 #8 Done Thanks CBrighton.
C CBrighton Surfing while working... Local time Today, 00:22 Joined Nov 9, 2010 Messages 1,012 Jan 19, 2011 #9 I assume you found the two missing brackets in my example (or just rewrote it using the correct number of brackets). I have edited my post in case anyone else finds this thread when looking for a solution to the same problem.
I assume you found the two missing brackets in my example (or just rewrote it using the correct number of brackets). I have edited my post in case anyone else finds this thread when looking for a solution to the same problem.
U Unicon Registered User. Local time Today, 03:22 Joined Dec 24, 2009 Messages 123 Jan 19, 2011 #10 True there is two missing bracket which I have noticed later only. Anyway thanks a lot.