Query query

I am trying to create a new field in which it shows the sum  total of 10 
fields (Charge Time, Charge Time 2, Charge Time 3, etc.); what is the easiest 
way to do this?
-- 
Joe
0
Utf
5/15/2007 5:26:04 PM
access.queries 6343 articles. 1 followers. Follow

4 Replies
1284 Views

Similar Articles

[PageSpeed] 1

NewFieldName: [Charge Time] + [Charge Time 2] + [Charge Time 3] .... etc

-- 
Good Luck
BS"D


"joet5402" wrote:

> I am trying to create a new field in which it shows the sum  total of 10 
> fields (Charge Time, Charge Time 2, Charge Time 3, etc.); what is the easiest 
> way to do this?
> -- 
> Joe
0
Utf
5/15/2007 6:22:01 PM
I tried this, and it doesn't work.  Is there something I'm forgetting?
-- 
Joe


"Ofer Cohen" wrote:

> 
> NewFieldName: [Charge Time] + [Charge Time 2] + [Charge Time 3] .... etc
> 
> -- 
> Good Luck
> BS"D
> 
> 
> "joet5402" wrote:
> 
> > I am trying to create a new field in which it shows the sum  total of 10 
> > fields (Charge Time, Charge Time 2, Charge Time 3, etc.); what is the easiest 
> > way to do this?
> > -- 
> > Joe
0
Utf
5/15/2007 6:26:03 PM
Do you have Null in some of the fields? if that the case use the Nz function 
to replace null with 0

Nz([Charge Time],0) + Nz([Charge Time 2],0) + ....

-- 
Good Luck
BS"D


"joet5402" wrote:

> I tried this, and it doesn't work.  Is there something I'm forgetting?
> -- 
> Joe
> 
> 
> "Ofer Cohen" wrote:
> 
> > 
> > NewFieldName: [Charge Time] + [Charge Time 2] + [Charge Time 3] .... etc
> > 
> > -- 
> > Good Luck
> > BS"D
> > 
> > 
> > "joet5402" wrote:
> > 
> > > I am trying to create a new field in which it shows the sum  total of 10 
> > > fields (Charge Time, Charge Time 2, Charge Time 3, etc.); what is the easiest 
> > > way to do this?
> > > -- 
> > > Joe
0
Utf
5/15/2007 6:29:01 PM
Thank you!  It worked!
-- 
Joe


"Ofer Cohen" wrote:

> Do you have Null in some of the fields? if that the case use the Nz function 
> to replace null with 0
> 
> Nz([Charge Time],0) + Nz([Charge Time 2],0) + ....
> 
> -- 
> Good Luck
> BS"D
> 
> 
> "joet5402" wrote:
> 
> > I tried this, and it doesn't work.  Is there something I'm forgetting?
> > -- 
> > Joe
> > 
> > 
> > "Ofer Cohen" wrote:
> > 
> > > 
> > > NewFieldName: [Charge Time] + [Charge Time 2] + [Charge Time 3] .... etc
> > > 
> > > -- 
> > > Good Luck
> > > BS"D
> > > 
> > > 
> > > "joet5402" wrote:
> > > 
> > > > I am trying to create a new field in which it shows the sum  total of 10 
> > > > fields (Charge Time, Charge Time 2, Charge Time 3, etc.); what is the easiest 
> > > > way to do this?
> > > > -- 
> > > > Joe
0
Utf
5/15/2007 6:36:01 PM
Reply:

Similar Artilces:

How to make a query records as criteria to the other query
I have a select query that will display these records (no duplicate): # Product Qty -- --------- ------ 1 Soap 3 2 Milk 4 When I click the "Soap" (record #1), it will open another query that will use "Soap" as criteria to show all the transaction for Soap. Product Date Buyer Qty --------- ------- -------- ------- Soap 12/1/10 AFD 1 Soap 13/1/10 FJH 1 Soap 16/2/10 ASN 1 Is any one can help me to get the above result. Use a form to display your query. I would u...

Displaying Query Results in a Textbox
Hello I am having a problem getting the results of a query to appear in a textbox. Does anyone know how to do this? Thanks JJJJS Please give a few details. -- -Larry- -- <craigalaniz@pobox.com> wrote in message news:1178829331.981143.115990@n59g2000hsh.googlegroups.com... > Hello > > I am having a problem getting the results of a query to appear in a > textbox. > > Does anyone know how to do this? > > Thanks > > JJJJS > ...

Show query results in form
So I have a combo box listing all the queries in my database. When I choose a query and click my [Run Query] button I'd like the query to display within a sub form I have below the combo box. I have it working right now writting the query results to a list box in my sub form but I can't edit any of the data. What I'd like is the full query view to show within my sub form so I can edit/sort etc. Thanks, Ken On Fri, 13 Nov 2009 13:50:01 -0800, KRR <KRR@discussions.microsoft.com> wrote: >So I have a combo box listing all the queries in my database. Whe...

chart will not plot data from SQL query
1. External data query against SQL stored proc returns results to cell as expected 2. Chart works with discrete data in same cells 3. Chart -> Source Data -> Series -> Values shows the corrected cells 4. Same results embedded or chart sheet ...

Query help please 04-08-10
I have two combo boxes. Location and Super1 The location box lets you select a location where a staff member is working at.For example U3 B-days. The Super1 box lets you select their supervisor who works U3 B-days. As it stands right now it will work. The problem is that it will show all Supervisors through out the whole place. I found a way where I can select from the Location box where it will pull up just the supervisors for that location in the Super1 box. That works so far so good. Now, where the problem comes in is when the staff member is a supervisor. For example: Staf...

Parameter queries
I have succesfully used range values as parameter values with MS Query and Excell2007. Suddenly this technique no longer works and when testing the queries I get the error message "SQL data type out of range". If I copy and paste the cell value into the criterion box of MS Query to replace the parameter prompt all works as expected. I get the same message with data types ranging from dates to simple strings. The SQL string seems to be the same as the older working versions. Please help! ...

need help with query ...
Hi, I am looking to write a query with multiple factors and do not know the best way to do it. I want use Event Type, Status, and Region as my queries variables. By default I want show "all", but then be able to use drop downs to filter with. Can anyone please give me an idea on the best way to do this? If this does not seem to make sense, please let me know. Kind Regards, Ray To be able to have combo boxes for query parameters, you must create a form with an unbound combo box for each parameter. See http://www.mvps.org/access/forms/frm0043.htm at "The Access Web" ...

Union Query with 3 tables
I'm trying to use a Union query with 3 tables to combine the following fields. Not all customers have a territory or broker; however, I would like al lthe customers listed in the output. Thanks for any help Customer Number from table 1 Territory Name from Table 2 Broker from table 3 What you are looking for is not a UNION query. A UNION query merges like data from multiple record sources into a single result set. In my experience, it's most common use is to normalize a poorly structured database. I believe what you want to do is create a query that links your Customer t...

Query using multiple listbox selections
In Access2002, I have a form with a listbox, where a user can select multiple line items. I'd like to pass all of the selections into a query, so that the associated report will contain data for all the items selected, rather than generating individual reports for each line item. How can I do that please? Any information would be greatly appreciated. Thanks! I've been using this syntax up to now: For Each valCount In ctl.ItemsSelected ---- Open the report and print it Next valCount where "ctl" is the listbox control. This function will do what you want: Private Func...

Is Not Null Doesn't work in my query
In my table the field is a text field. Training 01, Training 02, to Training 06 In my form the field is a combo box. When I created the report, the Training 06 field is blank. How do I not have this field show up in my report if it is blank. Thanks. -- Denise B. You could set the Can Shrink property of the text box and the Detail section of the report (or whatever section contains the text box) to Yes. If there is no data, the text box and its associated label will not appear. Note that this works if the text boxes are one above the other, but may not work if they are...

Layout/Formatting problems of Data Queries in Excel?
I am using Excel 2003 to display a simple table result from an Access 2003 table. 1. When I select a cell location for a Data Query in the XL spreadsheet, Excel moves all text, above or below that cell, to adjacent columns to the right of the selected cell. (Also, there is no undo option and it all has to be manually restored!) 2. In 'Data Range Properties', the option: 'Insert entire rows for new data, clear unused cellls' is selected. Despite this, the data is displayed with only cells inserted, not entire rows, rendering my report useless. ...

Query plan isn't doing an index seek
If you have the following: SELECT WorkID,VendorName = (SELECT VendorName FROM Vendor WHERE VendorID = ws.VendorID) FROM Work ws What I get is a Hash Match from 2 index scans. |--Compute Scalar(DEFINE:(dbo].[VENDOR].[VendorName]=[dbo].[VENDOR].[VendorName])) |--Hash Match(Right Outer Join, HASH:([dbo].[Z_VENDOR].[VendorID])=([ws].[VendorId]), RESIDUAL:([dbo].[VENDOR].[VendorID]=[dbo].[WORK].[VendorId] as [ws].[VendorId])) |--Clustered Index Scan(OBJECT:([dbo].[VENDOR].[PK_VENDOR])) |--Clustered Index Scan(OBJECT:([dbo].[WORK].[PK_Work] AS ...

Duane Hookom's Query By Form
I'm using this to give my database-challenged co-workers an easy way to run on-demand queries (so they can stop bugging me). On the query results form, I'm trying to give the option to print the underlying query. I can't get anything to work right: - DoCmd.PrintOut prints the form footer. - Tried opening a formatted duplicate of the query results form, but can't keep the form hidden from view to the user. - thought i was close with using Application. Echo False while opening "MyQuery" itself, but no matter what i try, my main form changes from maximiz...

Query filter problem!
Ok I'm trying to create a query which will be the basis for a report. Now the query results will be determined by selections made by the user on a form called frmLists. The form will have up to five separate list boxes, but we'll work with two for this discussion: List 1 List 2 null null A 1 B 2 C 3 D 4 I want the user to be able to select items form either or both list boxes and then the query will select the correct records based upon the selected. I thought about using separate check boxes under each list for the user to check if th...

Report filters or SQL Queries needed
I am a bit new to the RMS thing but wondered if anyone has a solution to the following reports needed (either with filters or queries): 1. Avergae units per transaction per sales rep (daily) 2. Average daily sales for sales rep 3. Average transaction sale ($) for sales rep (daily) This is probrably basic but I am still learning and anything would be a huge help. This discussion group is such a great tool for beginners and greatly appreciated!! Thanks, Billy @ ThinkPOS Hi! Retail Analytics from Professional Advantage is designed to help retailers manage their business by delivering a...

Aggregate query and Albert Kallal's Multiselect example
Hi All, I am attempting to build a continuous form that will allow users to 'purchase' items. The recordsource is an aggregate query that groups by part number and a boolean 'Rush' field, and sums the quantity ordered. The query works the way I want it too... Now I am trying to have a checkbox on this form for users to select, and that would mark the item(s) for ordering. I added in the 'ID' field that is the PK for the 'parts' - and used this while following Albert's Multi-Select example. The problem is that there can be 2 of the same items to be orde...

Linking Same Tables (Current/Previous) in a Query / Sum is multiplying value results
I'm trying to link two tables in Access...both tables contain the samefields with YTD totals. I need to subtract YTD Total between the two,to determine the difference. I have the tables linked via 2 fields.I group by the two fields, and sum on YTD. It is multiplying thevalues and I'm ending up with numbers in the 200,000 instead of max ofabout 5,000.I've tried doing queries separately, doing the sum, and then linkingthe two new queries...only to have the same results.I've tried turning them into Make-Table Queries, creating the tablesand running the new query off of the 2 ta...

Need help with this query 04-07-10
Hi, Here is the DDL : CREATE TABLE traffic ( unique_id int NOT NULL PRIMARY KEY , train_number int NOT NULL , carrier_id int NOT NULL ); -- some test data INSERT INTO traffic (unique_id, train_number, carrier_id) VALUES (1, 11, 1); INSERT INTO traffic (unique_id, train_number, carrier_id) VALUES (2, 11, 1); INSERT INTO traffic (unique_id, train_number, carrier_id) VALUES (3, 11, 2); INSERT INTO traffic (unique_id, train_number, carrier_id) VALUES (4, 22, 1); INSERT INTO traffic (unique_id, train_number, carrier_id) VALUES (5, 22, 2); I'm using MSSQL 2000, I w...

How to run a 'total' query
Hi,I'm relatively new to access and Im using access 2003. I created asmall database in an effort to track how much my friends owe me (justas a learning experience). I have two tables. 'Debts' and 'Debtors'The primary key in 'debtors' is used in 'debts' as the refference.In 'debts' I enter data in this format:Debtor ID (Primary Key from 'debtors')ReasonDateDueAmountPaid (checkbox y/n)On time (checkbox y/n)In the 'debtor' database I want a field for each debtor called 'TotalDebt'. How can I add up all the 'Amount Due' ...

Simple DateDiff query
Here it is: I have a form which contains the opening date and the resolved date and I'm trying to workout how many days it takes from opening to resolution. Is there a way to write a sql query to do this? Or can I write a formular in the table to show this? Or can I get a text box on the form to tell me this and then feed this through onto the table? I've been working on this all morning and would appreciate any help you can give me. Thanks, PAR ...

Trouble with autonumber field in a query
I am running Access 2003 and am trying to create a query with an autonumber field. I have two tables in the query each with 7 fields. I have 3 of the fields linked because I only want to see the values in the query if these 3 fields are equal between the two tables. I was trying to utilize an example I saw on: http://www.lebans.com/rownumber.htm To help me create an autonumber field in the query, but I get an error message that tells me "Undefined function 'Serialize' in expression" Is this because this orignal database from www.lebans.com uses an older version of Acces...

Updating a field with an aggregate query
I have a form where people input invoice data. Within that form is a subform where details of the invoice are entered, such as product and amount. The main form is linked to the Invoice table. The subform is linked to the Invoice Detail table. The two tables are joined by the invoice ID. I am trying to update the invoice table with the subtotal of the invoice detail amount. So basically, I want to take the subtotal of the all of the products and update it to a field in the Invoice table called Subtotal. Is there anyway to do that? TKI, it is *really* important not to store the ...

Query Expression Help!
I am in need of an expression for my query, HorseID can have multiple OwnerID as there could be 6 shares in a Horse, What I need is a query that will list all OwnerName in one Column, qryOwnerName.HorseName is from another Query TblHorseInfo HorseID / Number OwnerID / Number QryOwnerName HorseID, HorseName ,OwnerID, OwnerName -- Thanks in advance for any help with this......Bob MS Access 2007 accdb Windows XP Home Edition Ver 5.1 Service Pack 3 Bob, Usually you would select the horse in a form. Say the form's name is PFrmSelectHorse and you select the horse ...

SQL check query question
Hi everybody - I am trying to write a sql query that will pull in the check number/ and invoice number that it paid. It would also be nice if it could pull in the journal entry number as well. Any suggestions? let me revise my question please: my manager wants a report that will show the check amount paid on a PO Invoice. I need to be able to query the vendor/check number/check amount/po invoice ** the part I am struggling with is getting the query to pull the po invoice! what table would link the check number with the po invoice? "Michael@nyresume.com" wrote: > Hi everyb...

Using Like in query
Hello. I'm using Access 2k. I have a table that contains a field with single parts of a company name that I would like to compare to another table's field values that contain full company names. For example: the first table has the word "Interiors". Table 2 has a field that contains many company names that contain this word, like "Al's Interiors", "ACME Interiors and Design, Inc.", "Alpha Interiors and decoration", etc. Can you do a "like" join on two tables, or is this something I'm going to have to do in VBA?? Tha...