#### Combine Two Fields Values for Totals Report

```Hi Folks - I am tracking criminal cases. Each case has two combo-box
disposition fields: DISP1 and DISP2. Both dispositions "lookup" the same
list of dispositions, such as guilty, not guilty, waived and dismissed. I
need to run a report that counts the COMBINED values of both disposition
fields. So, for 4 cases, if the DISP1 field contained:

Guilty
Guilty
Dismissed
Waived

and the DISP2 field contained:

Guilty
Dismissed
Not Guilty
Waived

then I would need a query/report that counted the total dispositions. So the
final report would be:

Guilty   3
Dismissed   2
Waived    2
Not Guilty    1

Make sense?

Any ideas?

Thanks,

Michael

```
 0
Michael
6/7/2007 3:29:36 PM
access.queries 6343 articles. 1 followers.

1 Replies
1570 Views

Similar Articles

[PageSpeed] 17

```Michael wrote:

>Hi Folks - I am tracking criminal cases. Each case has two combo-box
>disposition fields: DISP1 and DISP2. Both dispositions "lookup" the same
>list of dispositions, such as guilty, not guilty, waived and dismissed. I
>need to run a report that counts the COMBINED values of both disposition
>fields. So, for 4 cases, if the DISP1 field contained:
>
>Guilty
>Guilty
>Dismissed
>Waived
>
>and the DISP2 field contained:
>
>Guilty
>Dismissed
>Not Guilty
>Waived
>
>then I would need a query/report that counted the total dispositions. So the
>final report would be:
>
>Guilty   3
>Dismissed   2
>Waived    2
>Not Guilty    1

First, you need to normalize the dispositions in a query:

qry1:
SELECT Case, disp1 As Disp
FROM thetable
UNION ALL
SELECT Case, disp2
FROM thetable
WHERE . . .

Then the totals query would simply be:

SELECT Case, Count(Disp) As DispCount
FROM qry1
GROUP BY Case

--
Marsh
MVP [MS Access]
```
 0
Marshall
6/7/2007 4:02:51 PM

Similar Artilces:

TempVars unusable in field default value
Hello, I'm trying to use a temporary variable to keep track of which CSR is inputting data. I have a macro which prompts user for ID code, which is stored in the temp variable TempUser. On a form control default value property, I can use the expression [TempVars]![TempUser], which will populate that user's ID code into the control. However, I cannot use that same expression in the tables field default value property. If I try, when I save the changes to the table, I get the error message "Could not find the field 'TempVars]![TempUser'. " Any ideas why I ca...

send the same e-mail with one or two fields changed.......
I would like to send the same e-mail to many differnet people with one or two fields changed (for example the name of recipient and the date).How canthis be done?? I would also like to be able to save the e-mail and use it again and again. can anyone help cheers john If you have Word installed and it's the same version as Outlook (both 2003, for example), you can do a mail merge between the two. This would allow you to set up the text the way you want it to, and you can save the document for future use. Look at the following page for further information: http://www.slipstick.com/con...

rounding up values
Has anyone done round up of values to the nearest dollar.For example I want to give a 10% of the price to my customers but if the result is other than .00 then I wanted to round up to the nearest dollar amount.My calculation using sql has been price * percent and then subtract the value from the price, then what do I need to do to roundit up??Thanks for your suggestion.Also I have a problem with my customers that I am extracting and the query does return all the values from 2004 and 2006 that are equal except for the price I have given them, how do I get only the latest ones in 2006 and not th...

Reporting IRA distributions
I have an IRA account with corresponding cash account. I am trying to get the distribution from the IRA to show up as "Retirement Income" in the Tax-Related Transactions report. How to do it? The distributions are handled as a transfer from the IRA Investment cash acct to a checking account. Thanks for any help. Money 99, BTW. Do I need to upgrade to a later version? ...

Duplicate Rows
I have an extract from a student information system in Excel that looks like this. Student Class Grade Quarter John Chemistry 70 1 John Chemistry 80 2 John Math 95 1 John Math 100 2 Alice Chemistry 67 1 Alice Chemistry 47 2 Alice Math 88 1 Alice Math 85 2 What I would like is this: John 70 80 95 100 Alice 67 47 88 85 However, since there are hundreds of students, this would be an extreme pain to do by hand. Is there any built-in formula or function in Excel that can do this? What is it that you actually want to do? (The best approach depends on what your desired end r...

Field Service Calls and Invoices
We use the Service Call modules for repairs in our Stores and have a situation that I'm trying to find a workaround. We have situations where our technicians will pick-up items without prior notification to our dispatchers. All of a sudden we get an invoice and currently we have to track down the charge and then we are forcing a PO into the system from the Service Call in order to properly receive and enter the invoice. Does anyone have other ways to do this and track the information/cost on the Service Call without needing to create a PO after the fact. This is not an applicat...

line chart with NA() values
12 month line chart, with some values being 0. I am using an if statement that turns any 0 values to #N/A so they do not show on the graph (which is what I want). My problem arises when the 0 values fall in the middle of my data. So for example: 1) data for all months (Jan-Dec), the line shows across all 12 months; 2) I have data for only 6 months (Jul-Dec), the line starts in Jul and ends in Dec (perfect); 3) When I have data from Jan-Mar, and Oct-Dec, the line connects between Mar and Oct. I want 2 distinct lines with no line where there is no data (#N/A). Any suggestions? -- gri...

Multivalue with Null value SSRS 2005
I have a query to populate a multivalue parameter: SELECT distinct cast(AGRPYear.value as varchar(4)) + AGRPMonth.value 'ReportDate' FROM TPROJECT AS TPROJECT One of the values that is returned from this query is NULL. However, when I run the report, the NULL value does not show in the dropdown. I've also tried adding "select NULL as 'ReportDate' union" to the above query and the null value still doesn't show. As a result some of the records in my database have a null value for this field, they will never show up on my report. Any id...

How to split an account into two accounts
8 years ago I started my 403B and 401A retirement accounts with Fidelity as a single account. It did not both me that the paper showed them as two accounts and I should have fixed it sooner. Now that Fidelity is allowing me to download the information it is clear that I should have two accounts. However I have purchased 4 mutal funds every two weeks for the past 8 years and now to split them it appears I need to move 2 of these sets of fund transactionss to a the account. The move one transaction at a time is growing old. Is their an easy way or to accomlish a mass move of all transac...

Report Can Grow not aligned horizontally
I have a report where I have 1 row of text, memo, number, and date fields. The memo field can contain up to 4-5 lines of wrapped text. I have set all teh rows to "can grow". However, on my report, the conditional formatting doesn't grow. For instance, the fill (which I have set to a gray color) in the memo field is about 3 lines deep when there is a lot of text in the memo field, but the text and number fields associated with that record are actually only 1 line. This essentially looks like a mess, small gray filled boxes for the text fields and a large gray ...

Hi Guys, I was wondering if I could get some help with the following problem we are having on our company. Here is the scenario; Our Windows NT 4.0 SP4a server running Exchange 5.5 SP4 crashed (Server 1) due to the exchange database reaching its 16 Gig's max limit. I went ahead and moved some mailboxes' e-mails to a few .pst files in order to make some space. This worked ok. Then, I decided to build another exchange server (Server 2) to moved some mailboxes and alleviate the load. Once the server was ready and configured as part of the current exchange site, I went ahead and move...

Custom reports #3
Hi, I want to pull a report on how many customers I am getting every hour of the day. Does anyone out there know how to do that? I can try writing a query if someone can tell me which table I can find this information in (timestamp, transaction etc). Any help is appreciated. Regards JD This info is given at the end of the Z report. If you want to use it in a query open the Z report recipt file using the Notepad and see the fields that are used... Report.Hour.HourSales etc... Hope this helps... Carlos "JD" wrote: > Hi, > > I want to pull a report on how many cust...

how to run onhand value report
I get the message enter parameter when entering the zoom feature On Sat, 6 Mar 2010 17:36:01 -0800, junebugg <junebugg@discussions.microsoft.com> wrote: >I get the message enter parameter when entering the zoom feature You'll have to give us some more context than that, junebugg. What's the "onhand value report"? What's the "zoom feature"? You can see your database; we cannot! -- John W. Vinson [MVP] ...

Duplicating one Field from One table to Another
Hi - I have two tables - one position, one personnel - which has a 1-to-many relationship (1 position record to many personnel records). The department had a new requirement which made it necessary to change some coding (I inherited this). I'm using tab forms so that when a position is pulled up, you can click on the tab that has the personnel information (if there is any). There is a button on the Personnel form that allows the user to add a new Personnel record. Since I am using an Auto-number field in the Position table (which doubles as the PK) the functionality is fine. Wh...

Increasing and decreasing values
Using column chart type I want to display increasing values and then decreasing values (not negative). For example 10,20,25 top value 55, then I want to show from 55 decrasing amount 10,35,10 (back to 0 starting point). Is it possible Put the numbers into the worksheet. A row or a column, whatever you like. If each number has a corresponding category label, put them in the row or column before the data. Select the data (one or two rows/columns), and run the Chart Wizard (the icon like a column chart, or Insert menu > Chart). Choose the Column chart type, and click through the rest o...

Textbox fomatting value based on another textbox
I have two text boxes on a form. One is a value that can be changed by the user. The second is the value 1 - textbox1. I need everthing to be in %. For example, in textbox1 the user could type 75 and it would automatically be recognized as 75% and textbox2's value would calculate to be 25%. Everytime I try textbox1's value is = to say 7500%. Any help is appreciated. Cheers, Job Maybe something like: Option Explicit Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) Dim TB1Val As Double With Me.TextBox1 If IsNumeric(.Value) Then TB1Va...

Formula to count the number of different values in a range
I'm looking for a formula that will give me the number of different values in a range. Example: Column A may have five cells that are "4", five cells that are "7", five cells that are "9". Of the fifteen cells that contain data, there are only 3 different values. I'd like to use a formula that will count the number of different values in column A, in this case the result is "3". Thanks, Paul Try... =SUMPRODUCT((A1:A15<>"")/COUNTIF(A1:A15,A1:A15&"")) OR =SUM(IF(A1:A15<>"",1/COUNTIF(A1:A...

Excel 2007 Line Chart
Hello, Is it possible to configure a line chart in Excel 2007 to ignore the intervals and graph straight to the next value. For example if I have the periods: Jan with the value 1000 Feb with the value 900 March with the value 500 April with the value 0 May with the value 0 June with the value 0 I want the March value to drop directly from 500 to 0 ignoring the interval to April, I do not want a curved line it must drop directly to zero then the line is straight across to April. I have no idea if this is possible, any ideas? Thanks, Brett On Tue, 11 Oct 2011 15:40:45 -0700 (PDT), TyreDu...

Combining Several Worksheet into one
I have over 30 excel worksheets that are: 1. Password protected 2. The sheet is also password protected 3. Each worksheet contains only one tab call "All" and this tab is in the same format and contains the same column in every sheet. 4. It's located in the same folder I need to write a macro that will open all these workbook in this folder and combine the data into one new sheet with only one tab called "All". I am able to write the code to open all the workbook but am having a difficult time figuring out how to copy only the cells with data into the new workbook...

Report: Cell #1, Cell #2, Cell #3, Cell #4
I am stuck again and would love som help :( I would like to repeat all words found inside ~25 cells, separated only by ", ", ignoring empty cells. Data: A1: [Apple ] A2: [Orange] A3: [Banana] A4: [Tomato] A5: [Syrup ] A6: [ ] A7: [ ] A8: [ ] The result should be something like: [Apple, Orange, Banana, Tomato, Syrup] -- JemyM ------------------------------------------------------------------------ JemyM's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=26945 View this thread: http://www.excelforum.com/showthread.php?thre...

"Freeze panes" settings lost after opening file in two windows
I'm using Excel 2003. I've got a big Excel file with multiple tabs. Many of them use "freeze panes" to keep headings in place. I needed to flip back and forth between multiple tabs, so I opened the file in a second windows. Now, when I save it, all the "freeze pane" settings are lost. Any suggestions? Thanks. That Freeze panes setting is assocated with a window. Maybe you're not looking at the correct window or maybe you closed the window that had freeze panes applied. I'd try: Window|Arrange|horizontal to see if you still have multiple windows assoc...

Memo Field Not pasting correctly in XL
I tried a search and couldn't find an answer. If there is an answer to this already please point me to it. I'm simply copying the record in Access and trying to paste it into XL. The problem that I'm having is one of the fields does not fully paste into XL. It is a memo field and has 539 characters. I'm only getting 255 when I try to paste the record in XL. I've tried copying just the contents of the cell and that worked fine. It seems as if I'm running into some sort of limitation. Does anyone know anything about this and is there a way to get around it? I checke...

Unassigned value in split transactions in conversion from Quicken 2001 to Microsoft Money v 14
With Quicken withdrawing from the UK market I have taken the plunge and upgraded to MM v 14. There is a serious conversion issue with the processing of split transactions where the first entry is converted correctly but all the other lines from the split transaction generate "empty" split entries each with a blank category and description with a zero value. This leaves an unassigned value equal to the sum of the ignored split entries. I have two Quicken accounts my private accounts going back to 1987 which generated a vast number of these unassigned amounts in split transactions a...

Departments on Z Report
Hello, I have noticed that as I set up new departments and categories into the database, the new departments are always printed last...or below all of the other departments. Is there a way to change this, and possibly have them organized alphebetically or in an order I would like? Thank You, Vicne Perhaps if you modified the department table usinfg Microsoft Access 2003 .... not that I would advise that :-) Vince... is this you... my buddy? Since you don't use an email address... I'm never sure if it you... and then I worry I'm getting too personal with someone I don'...

Errror Help: character ' ', hexadecimal value 0x2 is illegal in xml documents
what does this error mean? how can i fix this? thanks, raj * raj wrote in microsoft.public.dotnet.xml: >what does this error mean? how can i fix this? You have an octet 0x02 or perhaps a character reference &#x02; in the document. This is not allowed in XML 1.0; the latter is allowed in XML 1.1 but your version of the .NET framework probably does not support that, and most likely you have not declared this version either. In other words, your document includes random binary data and is there- fore not an XML document. You have to correct the document before you can successfully...