Summing Fields, Ignoring Certain Values

Jan 29, 2008

I have a number of fields that hold values (scores - either 0,1 or 2) that need to be summed but in some cases the value is 99 (which is recognised by our stats program as a N/A type of anwer- This occurs when a question is optional and the user hasnt answered it. I did not want to value to be null (since its not like the user didnt answer it because they missed out on it by accident but rather they could not) and it couldnt be 0 either since 0 actually means something different in the context of the questionnaire.

Lets say I have Q1 which has a value of 0, Q2 has a value of 1, Q3 has a value of 99 and Q4 has a value of 2
I want to get the total of Q1+Q2+Q3+Q4 for a particular entry but if the value of any or all of the questions are 99 I want access to ignore it and just sum the rest of the values i.e. the sum should read 0+1+2+(99)=3 not 102


I want to be able to include this sum function in the expression builder if possible since I am using it for a report. Can someone please help?

View Replies


ADVERTISEMENT

Ignoring Null Values From Form In Query

Mar 21, 2006

I have a form with 4 different search fields used to query a table and limit results: Policy#, SSN, Credit_Amt, Debit_Amt. Any matching rows based on the search criteria are returned in a subform.

My problem is how to handle any fields where the user doesn't specify a search value.

In my query, I have the Criteria set to:
Field: Policy_No
Criteria: =[Forms]![form name]![Policy#]

Field: SSN
Criteria: =[Forms]![form name]![SSN]

and so on....

If I place my criteria on different OR lines, the query runs, but if a user specifies more than 1 criteria, I get all the data for one criteria(such as policy# matches) and all the data for the second criteria(such as all the records for a certain credit_amt, regardless of Policy #).

If I place my criteria on the same criteria line, effectively making it AND, I get no results because I assume the database is looking for any blank search field values.

So, how do I make the query an "AND" query, but actually get results by ignoring any NULL search fields? So if a user enters a Policy# and Credit_Amt, the results will be only matching rows by Policy# AND Credit_Amt, and doesn't look at SSN and Debit_Amt.

I've tried different iterations using IIF(Not IsNull(.... to no avail.

Thanks!

View 3 Replies View Related

Ignoring Blank Fields

Jan 15, 2006

:confused: I have a Text box on a Form that copies data entered into other Text boxes on the same form.
Sometimes there may be the odd text box that does not have any data in it.
Is there anyway that I can put in code so that the blank text boxes are not copied into the main text box i.e. Only the populated text boxes are to be copied.
Thankyou for any assistance that you can provide.:eek:

View 4 Replies View Related

Ignoring Duplicates In Table Field Values That Is For A Combo Box Drop Down List

Apr 13, 2014

I'm trying to create a combo box that takes its values from a field in a table, the thing is that this field has duplicates because:

* The table is a qualification look up table
* It has 3 fields: QualificationID (autonumber), Qualification(e.g. Bachelor), Programme (e.g. Science)
* E.g of duplicate values (this is not a problem as it is necessary) Bachelor of Science, Diploma of Science, Certificate of Science

What I'm trying to do is create 2 single-columned combo boxes that are a parameter for a query and it's working except the combo boxes show duplicated valuesIs there a way to get the query that is the row source for the combo box to eliminate duplicates?

View 2 Replies View Related

Concatenating Fields Ignoring Blanks

Jun 4, 2006

In a query, I'm using concatenation to join multiple address fields (organisation, building number, street address, etc) into one field. I'm also inserting line breaks to create a formatted address and then creating a form on the query so the formatted address appears in a text box and can be copied and pasted straight into my label-writer software to print address labels.

This is the concatenation code I'm using:

Expr1: [Organisation] & Chr(13) & Chr(10) & [Building Number] & Chr(13) & Chr(10) etc.

However, one problem with which I am now presented is where a field is blank. E.g. if one of my contacts is retired, then they don't have an organisation listed in the "Organisation" field. This means that a blank line is left between their name and the rest of the address.

When running a mailmerge there is the option of skipping blank fields so that a blank line is not inserted in such cases.

How can I achieve this within the above code?

Gary

View 6 Replies View Related

Ignoring Blank Fields (explained Better?!)

Jan 16, 2006

I have a Text box on a Form that copies data entered into other Text boxes on the same form.
I have used the formula =[Text2] &" "& [Combo26] etc in the main text box that I want all the information in.
Sometimes there may be the odd text box that does not have any data in it.
Is there anyway that I can put in code so that the blank text boxes are not copied into the main text box i.e. Only the populated text boxes are to be copied.
Thankyou for any assistance that you can provide.

View 1 Replies View Related

Summing Values By Considering The Yes/No Checkboxes.

Aug 28, 2006

Hi,

i have created a table that would calculate the total payments that are being made by a certain contractor. I am assuming that the contractor pays the money in three installments.

In a table I have created three fields which are all checkboxes that would state whether a payment has been made or not, for example, checkbox1 would state whether the first payment has been made. And I also have three other fields that states the amount to be paid on each installment

Now, i want to calculate the total amount that have been payed. For example, lets say that the first installment has been made (i.e the checkbox is checked), then the first payment should be added. And if the second payment has been made it should be added as well, thus finally giving the total amount that has been made.

I know how the logic should look like, but i just don't know the syntax that i should use in the query.

Thanks.

View 1 Replies View Related

Summing Parameter Values!

Oct 11, 2004

BACKGROUND: I have a query, in which the user decides a customer name. According to the customer name a specific custom price is chosen for the customer from tblInputProductSpecs. Based on this I do the following calculation Total Price:[Price]*[Quantity], where the quantity is already known.

PROBLEM: Since the Total Price is total price for a specific product. I wanted to calculate the TOTAL of all the Total Price/Product. But finding it really hard to do this. I tried to do Total:SUM([Total Price]), but this doesn't work. I get an error. I even tried Total Price:SUM([Price]*[Quantity]), but this also doesn't work. Is there any possible way to find this TOTAL?


I would really appreciate your help with this frustrating problem.

regards,
Vakul

View 3 Replies View Related

Summing All Values From A Certain Date

Feb 10, 2012

I have three account types (Student, Departmental, and CC). On a fiscal month, each has a certain amount of counts per fee type. I want to find the total number of items among the three account types.

For example:
On July 2006,
The "Student Account" has 437 "Items Deposited"
The "Dept. Account" has 2,691 "Items Deposited"
The "CC Account" has 0 "Items Deposited"

I want to find the sum of these three (3128). I have 102 different months and 7 types of fees onto which I need to do this.

View 3 Replies View Related

Summing All Values In Textbox Which Has Expression

Mar 12, 2013

I have created a report and i am having trouble with the =Sum() function. I would like to sum all the values that are held in a text box which has the expression of '=[BookingSF_Qry subreport].[Report]![TotalSF]*[HowManyDays]'. No matter what i try i cant get a total value of all of these.

View 14 Replies View Related

Summing Values On A Form, Then Further Entering In Table

Sep 1, 2005

Hey there, Im currently making a form so users can enter project information. For this particular project, the user must choose from a variety of options, and each option has a number value assigned to it for a rating. Now at the end of this form, I want a sum of the ratings, and then entered into the table. I am using a text box for the sum of ratings, and can get the sum of ratings to work on the form, but this data is entered as a 0 in the table. If anyone could help me find a way to put the actual sum in the table, that would be excellent.. thx a lot.

If it would be any help, here are the names of text boxes that I'm adding:

Health and Safety Rating, Maintenance Rating, Equipment Rating, School Size Rating, Student Enrollment Rating, SD Priority Rating, Project Requested Previously Rating

Those ratings must be added into "Total Rating"

Thankyou!

View 4 Replies View Related

General :: Summing Total Values By Each Change In Date

Apr 14, 2014

Running Access 2010. I have a large data set here is sample:

Type Capture Date Volume
1 1/5/2014 7
1 1/15/2014 5
1 1/8/2014 3
1 1/10/2014 4

Is there any way to sum the total values for each change in date while keeping chronological order? To get access to produce something like this:

Type Capture Date Volume
1 1/5/2014 7
1 1/8/2014 10
1 1/10/2014 14
1 1/15/2014 19

View 1 Replies View Related

Summing Many Yes/no Fields

Jan 9, 2008

Hello, I am a newbie access user, so this might be a stupid question, but here it is:

I have a lot of yes/no fields labeled "10/1", "10/3", "10/5", ... (dates)
They are to record attendance on particular days.
I want to make a query that gives me the sum of a student's attendance and I have no idea to go about that. Any help is much appreciated.

Thanks!!

View 1 Replies View Related

Summing Fields In A Record

Aug 23, 2005

Hi,

Not sure if this is possible (sounds simple hopefully) but I was wondering if there was a way to sum certain fields in a record on a continuous form.

E.g. Field1 and Field2 in record 1.

Is it something simple like summing columns, i.e. Sum(Field1)?

Any help would be much appreciated.

View 1 Replies View Related

Summing Up 3 Fields In A Record

Nov 12, 2007

Hi,
I am trying to figure out the best way to design a table. The table is going to contain data concerning checks that have been given to a church. Each check could be broken down into 3 different categories; Tithes, Offering, Other. In other words one check for $100 dollars might be Tithes $40.00, Offering $30.00, Other $30.00. I need to be able to enter these three amounts into the record and then have them totaled in another field.

Is it best to do this all in one record or should I have two tables? If I have two tables how do I get one form to enter the break down into one table and the total in another table. Fyi, if I do this in one record I don't want them to have to enter in the total. I want the total that is entered to be calculated by the three previous fields.

Thanks for any help you can be on this.

View 14 Replies View Related

Summing Other Fields Per Record

Jun 28, 2006

Is there a way to use a query to sum totals of several fields per record? In the db I have designed, I have 5 seperate fields for estimates from different departments. There is also a field for Total estimates. What I would like to do is have the Total Estimates field autocalculate the total sum of the other 5 estimate fields. Is this possible to do through a query? If so how? If not - is it possible at all?

Thanks!

View 1 Replies View Related

Summing Two Fields In A Query

Jul 17, 2007

I have 2 fields, Accounts, Accounts CMO. I need those two fields to show in the same table in a new field called Total Accounts. I am summing them, but getting irregular results, some are right, and some are 4 times more than they should be? How would you go about doing this, maybe I am missing something.

View 1 Replies View Related

Hi! I Need Help With Summing Fields And Expressions

Dec 18, 2006

Hi! I'm trying to create a query using option groups, i have two options the first one is STOCK and the other is PD.
If i select stock the the query i want to create to introduce it on a form is:
I have 5 fields
-denominación
-reserva
-almacen
-cantidad
-stmax
If i select stock
then the query is
If (reserva +almacen)<cantidad then on a sub form have to appear the table with all the rows where (reserva +almacen)<cantidad.
but if i select PD only have to select on stmax the rows where value=PD
PLEASE i need help with this....

View 1 Replies View Related

Summing Fields In A Form

May 1, 2007

I have run into this problem with several databases I have created. I have my tables all set to store my information. I create the form to enter the information. I try to create the field to calculate a total and every time I enter the amount in the form, I get '?name' or '#name'.

With this particular database, I am looking to track expenses. Expense categories on the left, dates across the top, amounts in the middle, totals across the bottom for dates and down the right for categories.

If there was a way to attach a document, I would send the expense report. If you want to look at it, let me know and I will send it. It's a small xls file.

Thanks.

DT

View 2 Replies View Related

Summing Conditional Multiple Fields

Mar 1, 2007

Hi all, sorry to bother you all, especially if this has already been answered, but I can't seem to find the solution to it. Assuming that what I've been doing has been correct that is.

I have three (3) tables with the following fields (where PK is primary key);
[tbl Ingred]: IngredID (PK), ProdID_fk, CompCode, IngredName, Weight, Symbol, RP01, RP02, RP03, RP04, RP05, RP06, RP07, RP08, RP09, RP10
[tbl Prod]: ProdID (PK), ProdName, FP, BP, SBU, ProdNotes
[tbl RPCalc]: RPs, RPs_long (PK), Sym, Limit, Sym_1, RP_1, Comp_1, Add, RP_01, RPNotes

[tbl Prod] has a one-to-many relationship with [tbl Ingred]; that is, for one ProdID, there can be many IngredIDs. The tables are designed so that the final user-displayed form is 'user-friendly'.

I've made a qry called [qry Qcalc] used to calculate the the Quotation (Q) of each of the 10 RPs (RP01 - RP10). Which simply for the first one is; QRP01: [Weight]/[tbl RPCalc_1].Limit, where the [tbl Ingred].[RP01] is linked to a corresponding [tbl RPCalc], by the [RPs] field. As for one [RPs] there may be multiple [RPs_long]. The way it is set up is so that the [RPs] and [RPs_long] are mapped correctly, to be used for calculations.

However, I am now stuck with a problem. I need to sum up these QRP values ([QRP01] - [QRP10]), based on (at least?) two conditions. The user can enter in their RPs; e.g. R10, R20, R21 in any of the [RP01] to [RP10]'s, and in any order.

What I need is to be able to obtain a sum of the Q values for each [RPs_long] (e.g. R10, R20, R21), rather than being the sum of the fields [RP01] to [RP10]. Also, each [RPs_long] may or may not be able to be summed up, depending on another field [Add] which has a "Yes" or "No". "Yes" is for it being able to be summed up, and "No" for it not being additive.

So the end result would be; for each [ProdID], there will be multiple [IngredID] where each will have up to ten (10) "RPs" (that being the [RP01] to [RP10] fields). These inputted "RPs" are then related to [tbl RPCalc] to be able to obtain the Q-values. If the Q-Value is not greater or equal to 1 (>= 1), then the sum of the Q-values for each [RPs_long], provided that the [Add] field is "Yes", will then be able to determine what are the final output RPs to be used, i.e. for the sum of the Q-values are greater or equal to 1 (>= 1), that [RPs_long] will be used.

I've been stuck on this for quite some time, and I know that if I change the whole table structure (like having a field for each RPs in the [tbl Ingred]), I might be able to make it much easier for myself. However, by doing so, it will not be able to offer as much flexibility in the calculations, and also, may not make it as 'user-friendly'. Another thought was maybe to create another table with just the [CompCodeID] (based on [tbl Ingred].[CompCode]), [Weight], [RP], but I'm not too sure how this will work either, but I might give it a shot if this current method doesn't work.

I hope that this made sense, as it is all quite complex (and confusing) to me. Any help on this matter will be much appreciated. Thanks in advance.

View 2 Replies View Related

Problem With Summing Fields In Subforms

Nov 17, 2006

Would like to create a sum of a field in a sub form. I am using =sum([name of field]) in the footer of the sub form but it only gives me the answer of the first entry in the form. I also created an unbound box in the detail portion =[table1 subform].[form]![name of field]. What am I doing wrong?

View 1 Replies View Related

Summing Specific Fields On A Report

Feb 14, 2014

In the footer of my report I have a field that sums the Transaction Amounts - =Sum([Transaction Amount])

I would also like to break the totals down further by Transaction Type Codes.

Something like =Sum([Transaction Amount]) where Transaction Type Code = AL-Exp-Paid

View 4 Replies View Related

Queries :: Expression Summing From Fields With Dates

Aug 3, 2015

I am involved in centrally managing a project , a part of which involves employees of certain companies being given a weekly subsidy for study on academic courses. I have successfully set up a table for all the learners and a related table for companies.

Each learner will receive a fixed weekly rate subsidy in the first year, and a lower fixed weekly rate subsidy in the second year. Somebody (not me) will need to check their paychecks to ensure that employees have been paid and all is above board. The learners/employees can start on the programme at any time. I need a way to track this (total claimed amounts, where they're up to etc).

My theoretical solution, is to have a field for each week a learner is on the programme (52 first year, 52 second), and instead of entering a currency amount in the field, the check-person can enter the date they saw the evidence and are happy with it. I thought then if I create a query that searches any dates that fall within the current claim period (eg >01/01/2015, <=Date()), and multiplies field count that fall within those parameters by first/second year subsidy rate if they're in that table. I think my logic is sound, I am just not sure how to write the query/expression, or if it's possible, or if there is a much simpler way to do it.

View 4 Replies View Related

Summing Multiple Fields From One Table In A Form

Apr 1, 2014

[AR&R Hours]+[PTO # of Hours]+[Meeting/Calls # of Hours]+[System Issues # of Hours]+[BAU Training # of Hours]+[Exception Processing Hours]+[AIG Related Activities]+[Admin Work Hours]+[Migration Hours]+[Project Hours]

Need the fastest and easiest way to auto calculate the above in a field on a form. i can get it to calculate in a query but need it to do in the form as well.

View 14 Replies View Related

Modules & VBA :: Summing Multiple Queries And Summing Time

Oct 4, 2013

I have a sales form. The sales form has many Call, Meetings and Emails linked to each sales record. I want to total all the number of calls, meeting and email records related to the sales record to give a total- Touches.I've created 3 queries;

1 - Counts Calls
2 - Counts Emails
3 - Counts Meetings

These all work fine however when I combine them to attempt to count the results it doesn't produce the correct results.I have a second query as well (no pun intended).

I am trying to sum together a column that has values in Time. The results displays as a decimal. How can I have the result display as a Time i.e. 1:20 (1 hour 20 minutes).

View 1 Replies View Related

Reports :: Summing Calculated Fields On Reports And Tables To Include Cents?

Feb 18, 2014

In my tables i have used calculated fields. one of the fields is to "total expenses." In a report, i need to show the sum of all the "total expenses", the filed populates in the report but the cents are missing. for example if the amount is 6080.40 it shows as 6080. how can i get around this? I have tried changing the decimal point value to 2 at which point the value turns to 6080.00 when it should be 6080.40 (i am a beginner at this i am assuming the answer will probably involve c++ or visual basic's, two concepts i am not familiar with.)

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved