473,387 Members | 1,497 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How do I create a calculated sum field in Access form?

I am new to Access and need some help with creating calculated fields. I am trying to create a calculated sum field in a form, the sumfield would add the values of 5 fields in a table (all 5 fields are currency). I created the calculated field (text box)and using the expression builder created sum of fields1-5, and it works fine so long as all 5 fields contain a number or $0 in them. If 1 or more fields are blank then I get nothing in the calculated field. I think the solution has something to do with the IsNull function but I'm not quite sure how to create the formula in Expression Builder or how to use IsNull. Can anyone help with a suggestion? Thank You.
May 5 '11 #1

✓ answered by dsatino

you need the nz() function which replaces nulls with your choice, which is zero in this case.

so it would be nz([yourfield1],0)+ nz([yourfield2],0)+...

2 9146
dsatino
393 256MB
you need the nz() function which replaces nulls with your choice, which is zero in this case.

so it would be nz([yourfield1],0)+ nz([yourfield2],0)+...
May 5 '11 #2
Thanks alot. That worked. The last time I did any serious database programming was with DBaseIV and that was DOS based. There's alot of grey areas in my memory still and I have to get used to this windows based programming. I appreciate the help.
D-
May 9 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: MX1 | last post by:
Does anyone know if you can convert a form into a data access page? It looks like you can only convert tables and I have a form with some very complex calculations that I'd love to leverage via an...
14
by: Allen Browne | last post by:
Subform is based on a single-table query that contains a calculated field: Amount: Round(CCur(Nz(*,0)),2) Continuous subform displays this field in a text box named Amount. As user enters new...
4
by: Apple | last post by:
Can I edit an calculated field in my form if needed. Thank you in advance for your help. Sincerely Apple
2
by: John | last post by:
I am using Access 2000. One table in my database has a field called RankName. Values inlcude: Officer, Sergeant, Lieutenant. I need create a report that groups these three RankNames into two...
3
by: kelley.l.turner | last post by:
Hi all, I am very new to MS Access so please bear with me! I have created a simple calculated field in my data entry form, yet when I view my data table or try to generate a report based on...
5
by: Henrik | last post by:
The problem is (using MS Access 2003) I am unable to retrieve long strings (255 chars) from calculated fields through a recordset. The data takes the trip in three phases: 1. A custom public...
9
by: Haas C | last post by:
Hi all! Is there anyway I can override a value in a calculated field on a form? For example: I have a form which displays the following fields based on a query: Premium Due field has the...
3
by: myemail.an | last post by:
I use Access 2007 and create queries with a number of calculated fields/expressions (I'm still a novice so please forgive me if my wording is imprecise...), like: MyCalculation = Field1 - Field2. ...
5
by: wassimdaccache | last post by:
Dear expert; using access 2003 . I have a table name "tables" that contains "tableid" & "tabledesc" The idea is to design a form that contains for each record in "tables-->tableid" a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.