Adding two items on report to get a sum of both

Hi. I am in the process of modifying a established report to make it more
meaningful. In the report there are two quires that give an answer. I want to
add a third box adding these two together. 

The first one is:   =IIf([TotalCash] Is Null Or 0,"0:00",(Int([TotalCash]/60))
& ":" & (Format((([TotalCash])-((Int([TotalCash]/60))*60)),"00")))

The sencond one:  =IIf([Time] Is Null Or 0,"0:00",(Int([Time]/60)) & ":" &
(Format((([Time])-((Int([Time]/60))*60)),"00")))

I would like to add those 2 results together, TIME and TOTALCASH to give a
third total (sum) to be named TOTALOT (in hh:mm). I am having trouble in
creating the query. Is this even possible? Thanks for any help that's offered.


0
peterde
1/16/2010 3:42:28 AM
access.reports 4434 articles. 0 followers. Follow

1 Replies
698 Views

Similar Articles

[PageSpeed] 34

Both expressions you created are text (not numeric) so you cannot sum them.

Change the Control Source to:
    =IIf([TotalCash] Is Null, 0, Int([TotalCash]/60])
Then use the Format property of the text box to make it display the way you 
want.

Likewise with the second.

You will then be able to sum them with a 3rd box that has Control Source of:
    =[T1] + [T2]
substituting the name of your other text boxes, and putting this 3rd box 
into the same section as the other two.

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.


"peterde" <u57519@uwe> wrote in message news:a22d823f37207@uwe...
> Hi. I am in the process of modifying a established report to make it more
> meaningful. In the report there are two quires that give an answer. I want 
> to
> add a third box adding these two together.
>
> The first one is:   =IIf([TotalCash] Is Null Or 
> 0,"0:00",(Int([TotalCash]/60))
> & ":" & (Format((([TotalCash])-((Int([TotalCash]/60))*60)),"00")))
>
> The sencond one:  =IIf([Time] Is Null Or 0,"0:00",(Int([Time]/60)) & ":" &
> (Format((([Time])-((Int([Time]/60))*60)),"00")))
>
> I would like to add those 2 results together, TIME and TOTALCASH to give a
> third total (sum) to be named TOTALOT (in hh:mm). I am having trouble in
> creating the query. Is this even possible? Thanks for any help that's 
> offered.
>
> 
0
Allen
1/16/2010 5:30:29 AM
Reply:

Similar Artilces:

Adding hyperlinks with parameters
Hey everybody I have a batch file which needs to be run from an excel sheet with a parameter, like this: c:\1.bat myParameter But when i try to run the Hyperlink, the Excel shows an error message saying it can't open the specified file (probably because the is a space between the file and the parameter) is there any known way to run the link from the excel? On Mar 2, 12:45=A0pm, Pasha <pavel_v...@mailto.mod.gov.il> wrote: > Hey everybody > I have a batch file which needs to be run from an excel sheet with a > parameter, like this: > c:\1.bat myParameter > But when i ...

Adding Blank Rows after the last Detail of the Report
Hi All, I've used this code from Dwayne: Private Sub Report_Page() Dim intNumLines As Integer Dim intLineNumber As Integer Dim intTopMargin As Integer Dim ctl As Control Dim intLineHeight As Integer intNumLines = 12 intTopMargin = Me.Section(3).Height intLineHeight = Me.Section(0).Height For Each ctl In Me.Section(0).Controls For intLineNumber = 0 To intNumLines - 1 Me.Line (ctl.Left, intTopMargin + _ (intLineNumber * intLineHeight)) - _ Step(ctl.Width, intLineHeight), , B Next Next End Sub My report needs to print blank rows (at least...

Duplicated mortgage payment in Budget Reports
Hello All, this is my first time trying out a newsgroup for assistance, but I am having a pain in the a$$ problem with my budget reports. Sometime this month, all of my budget based reports started showing a duplicated amount for my mortgage payment. So if my mortgage payment were $500, the reports would show that I had $1000 budgeted for "debt". I have checked and double checked my budget itself and there is only the one entry there. There is only one entry in Bills & Deposits and only one on the cash flow forecast. Any ideas on how to find where it is reading in the extra...

Possiblity of Two X Axis Graph
I need to compare 2008 sales against 2009 sales side by side in asingle graph. My data is given below PERIOD-09 Jan 09 Feb 09 Mar 09 Apr 09 SALES-09 2500 2550 2230 3100 PERIOD-08 Jan 08 Feb 08 Mar 08 Apr 08 SALES-08 1900 1990 2301 2900 Any solution? Fowmy Add a helper column and just display month =MONTH(SerialDate) Use that for the X axis. That may be the easiest way assuming you are only looking at a calendar year. -- HTH, Barb Reinhardt "Fowmy" wrote: > I need to compare 2008 sales against 2009 sales side by side in asingle graph. > My data is given below...

outlook vcard, ad integration user properties
my boss is trying to get hix fax# in his vcard. he is using his address from the global address list I have modified his profile in active directory users and computers: I go into AD users and computers, double click on his user, go to the telephones tab, and enter his fax #. but when I did this his fax # is still not being pulled up in his outlook vcard. Does anyone know where outlook is trying to get this field from / how i can get this field into his vcard? thx ...

two domains in one outlook profile
Hey, Is there a way to choose what address shows up on the Sent From line in outlook. I have a users, all in one exchange server, who need to have their FROM LINE display a different domain then their main reply email. Both addresses are set up on their exchange account, so then can receive emails when an email is sent to user@domain1.com and user@domain2.com. By default, when they create a new email, the recipient will always see @domain1.com. Is there a way to choose what domain shows up in the FROM line so that when they need to send to certain recipients, the recipient sees ...

Reports only Show 10 Records
I notice that when you run a lot of the reports (eg Account Overview) there is only a maximum of ten records returned. This appears to be hardcoded as the report also states the fact in the footer. Any way around this? If the filter used on the report actually referred to, for instance, 25 Accounts how would you get all 25 reports? Maybe I am missing something. Thanks Cozy export that report to its rdl file and take a look through the reports source code which might tell you. Also make sure you also export any of its sub reports. ======================= John O'Donnell Microsof...

Default PO Price Different From Cost Prices in Item Card
The standard cost, current cost and the orginating invoice cost in the item card are all the same (£2.11). When creating a PO, the correct Unit Cost appears as long as the quantities have not yet been changed. However, once a quantity has been entered, the Unit Cost changes to another figure (£12.89), which we're not sure where it's being pulled from. Has anyone experienced the same problem or have any thoughts on this matter? Thank you If you have ordered this item before from the same vendor, you will have a vendor item card. That card records the last price...

ADDING A NUMBER
how do i add a number to a range of cells? I need to add 11.27 to a number of different cells each with a different number in them Put 11.27 in an empty cell, format it the same way as the numbers you want to add to, copy it, then select the numbers you want to add to and do edit>paste special and select add. -- Regards, Peo Sjoblom "Helpme" <Helpme@discussions.microsoft.com> wrote in message news:6D51344A-78E6-4377-B292-FC6C16FF6BA2@microsoft.com... > how do i add a number to a range of cells? I need to add 11.27 to a > number > of different cells e...

adding new records
I am totally new to CRM, so I hope this is really easy question: This concerns permissions.. I have a "sales" group, and with one of those people i need to be able to let them add new records on behalf of other "sales" people. Is there like a standard permission setting for it? (obviously every "sales" person can add new records if they select them selfs as the owner) thanks, Michal. Hi, By default the person who creates the record will be the owner. After record creation the person could reassign the record (manually) to another user. If all rec...

Question abount sent items
Hello all, I know this is by design but I am asking the question anyway. When I associate someone elses' mailbox to my account and send an email on their behalf, Is there a way to make the sent items appear in their mailboxes instead of mine? Thanks in advance ...

When adding attachments...
....in Outlook the following errors comes up: "Out of memory or system resources, please close some programs and try again" Quotas are fine. I have deinstalled/reinstalled Office, cleaned 'temp' areas, and many other tidbits. Any other ideas? Thanks. This might help as i had this problem with Outlook 98. Is the file you are trying to copy to attach nested in sub folders? if so try and copy the attachment to a root drive like c:\ Ignore previous email. wrong spellin if the attachment is nested in sub folders(this means you have to open different folders to get to ...

emails in inbox disappeared. How to get them back?
"Christine French" <ChristineFrench@discussions.microsoft.com> wrote in message news:00FA97BA-EEF5-4780-9902-3158D68B06A6@microsoft.com... > Please write your DETAILED (including version of Outlook, type of email account, Windows version and Service pack level) question in this BIG WHITE SPACE. Thank you. Try View-Current View-Messages ...

MSCRM Report
hi, i will like to create a report which allow us to categorise the case type in a pie or bar chart. (Case type examples include: Sales Case, Cancellation Case, Support Case etc); we will like to know the propotion of case types we received per department, Does it require complicated programming? many thanks Alan Hi Alan, You need to develop a SQL Reporting Service (SRS) Report. It is not very difficult to develop SRS report if you already have any experience of creating reports like in crystal reports. You may use Microsoft Report Designer. You need to be very good in writing q...

Help in Query with two condition
hello all, I have a table like this: Planner Qty User6 CUT SUB BAM-06 1 CONC Yes No BAM-06 1 CONC No Yes BAM-06 1 TOC Yes No BAM-06 1 TOC No Yes BAM-06 1 TACT Yes No BAM-06 1 TACT No Yes JAXM-06 1 CONC Yes No JAXM-06 1 CONC No Yes JAXM-06 1 TOC Yes No JAXM-06 1 TOC No Yes JAXM-06 1 TACT Yes No JAXM-06 1 TACT No Yes Note: CUT and SUB are check box I want a result as follow: User6 A B C D E F CONC 2 2 1 1 1 1 TACT 2 2 1 1 1 1 TOC 2 2 1 1 1 1 WHERE: A SUM Qty =BAM-06 B SUM Qty =JAXM-06 C SUM Qty =BAM-06 if Cut=YES D SUM Qty =JAXM-06 if Cut=YES E SUM Qty =BAM-06 if SUB=YES F SUM Qty =JAXM-06 i...

Picture Disappears When Added To Contact In Outlook 2003
Can someone help please. When I try to attach a picture to a contact in outlook 2003 immediately I double click the picture to be attached it disappears out of the outlook contact along with the placement holder in the form. Only when I right click the mouse and go remove picture do I get the placement holder back. I have looked at all the help menus but they offer no clues. Thanks TS ...

How do I exclude data using the IIF statement in report builder
I have data in my dataset that I want to exclude in the average calculation for the final report (those with a key.value of 999). Here is how my statement is written but it is not returning any value. What am I doing wrong? =iif((Fields!MeasureID.Value = 1 or Fields!MeasureID.Value = 16) and NOT Fields!Key.Value = 999, round(Avg(Fields!CY_Rate.Value),0), iif((Fields!MeasureID.Value = 19 or Fields!MeasureID.Value = 20 or Fields!MeasureID.Value = 21 or Fields!MeasureID.Value = 22 or Fields!MeasureID.Value = 23 or Fields!MeasureID.Value = 24) and NOT Fields!Key.Value = 999, roun...

Sort by: Site ID/Item Number/Bin for Stock Count Entry Screen
Would like an additional sort selection in the Stock Count Entry Screen. Sort by: Site ID/Item Number/Bin ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsGroups/dgbrowser/en-us/default.mspx?mid=7e69d84a-032e-4f61...

Criteria Parameter in query for two fields: help
I have a form that utilizes two contact lists in separate combo boxes to illustrate projects that multiple people have worked on. I am trying to make it so that a report will illustrate the associated data based on these contacts. The selection will be based on either one contact (from either list) or both. Whereby on selection, the report will generate the associated data based on these user names. How would I go about creating a parameter in the query so that it will limit the content to reflect either contact list or a combination of the two? I am a beginner to Acc...

Adding ActiveX to dialog with wrapper
When I add an ActiveX object to a dialog using the dialog editor - right click - insert activeX object, the help on the resulting activex selection tool states that a wrapper will not be added by using this method. If you need a wrapper, it suggests using the class view. This is using Visual Studio 2005. I'm having some problems with this on an existing project. To make sure I understand the process, I created a new MFC project, added a dialog, created a class for that dialog and added a Flexgrid object using the right click method in the dialog. I then added a variable for the flexgrid...

Command button to open a report with a year's data
I have a report that shows statistical data for each month (txtmonth) I have a command button on a form that when clicked opens the report for the month selected on the form. I want to produce another form with a button that would open the report to show the total of records, using the same report, for the whole year. I think I ought to be able to do that by something like "open all records where the year of txtmonth = the year input on my form" can someone give me some guidance on how I would code the OnClick of this new button? Thanks Tony -- Why don't my grey cel...

I can't get my <Marquee>-based animated signature to work
Hi Gang, I modified someone else's animated signature. I have no idea what e- mail program they created it in, but it works great when he sends to me, but the copy I've manipulated for my own use won't work at all in outlook (very frustrating). Can someone tell me what changes I need to make to get this to work? Perhaps removing all styles or something? The following is the HTML I'm trying to add as my signature: ------------------------------------------------------------------------------------------------------------------------------------------------ <HTML> <...

Print two sheets in Excel
Can I print two sheets in Excel 97? Thanks. Emece, If you mean print them as one print job (consecutive page numbers, etc), you can select the two sheets (use the Ctrl key when clicking the second sheet tab). Then use File - Print - Active sheets. -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "Emece" <anonymous@discussions.microsoft.com> wrote in message news:174ad01c448cc$16656ad0$a501280a@phx.gbl... > Can I print two sheets in Excel 97? > > Thanks. > > ...

default pivot tabel from count to sum
Everytime I create a pivot table, it defaults to Count. I don't use count. I always use sum. Can this be changed somehow? EXCEL 2007 Pivot Table Data Crunching for Microsoft Office EXCEL 2007 by Jelen / Alexander page 292 states:- “MY PIVOT TABLE ALWAYS USES COUNT INSTEAD OF SUM You have a column in your data source that contains numbers. Furthermore, you have explicitly formatted that column to be a number field. Nevertheless, each time you try to add it to your Pivot Table EXCEL automatically tries to use Count on the field instead of Sum. This leaves you...

Filter for two columns
I have two columns Purchased Date and Depreciation Start Date. Can anyone help me to get the records with Depreciation Start Date greater than Purchased Date. Thanks Hi, sort with two conditions, highlight both columns, 1st condition Depreciation in descending order and as a 2nd condition Purchased in ascending order if this was helpful please say yes "Vadivu" wrote: > I have two columns Purchased Date and Depreciation Start Date. Can anyone > help me to get the records with Depreciation Start Date greater than > Purchased Date. > Thanks Use a helper col. As...