473,396 Members | 1,898 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,396 software developers and data experts.

I want to Add Multiple Criteria in an Access Report

I have a database where I have a field (Disposition) that allows you to choose options from a drop down menu, and I want to count each of those options in a Report. How can I do this?

I've tried the following:

Expand|Select|Wrap|Line Numbers
  1. =SUM(IIF([Disposition] like "Partial Grant", 1, 0))
Expand|Select|Wrap|Line Numbers
  1. =Count(IIF([Disposition] like "Partial Grant", 0))
I keep getting a large number. I think it's because it's double counting the some of the Disposition Results. Please help?

-Julio
Dec 18 '12 #1
3 2321
zmbd
5,501 Expert Mod 4TB
Julio1974 , Welcome to Bytes!

This would be something best handled in an aggregate or cross-tab query. And then there is the crosstab query that should be able to handle the same thing. In this case you're preference.

You should post your entire SQL - Please format it using the code button and you should read the posting guidlines as to how to post the SQL.

You might consider reading thru Aggregate Query Woes as some of the pitfalls are pointed out here.

Here's Mr. Brown's site... a ton of tips so I'd bookmark this site! However, in this case the cross-tab: Crosstab query techniques

Some basic SQL stuff - : Queries in Access using SQL View

Another mention of the cross-tab; however, this will help with some with the report side: Dynamic Reports

That should be enough to get you started. Rabbit, Neopa, and/or others should be along shortly (if they haven't already posted while I was typing this ... they type faster than I do :-P )

Once you get your query/report put together, should you still be having issues, please read the FAQ and posting guidelines about how to post your SQL/Code and will take another poke at the problem.
Dec 18 '12 #2
Zmbd, thanks for the quick response! As you can tell, I'm not a programmer. I'm just attempting to take on the challenge of automating a report I have to submit annually, and it has a lot of basic summation, as well as other more complicated stats (median's, averages, etc).

I'll read through your suggested sites.

Thanks again,
Julio
Dec 18 '12 #3
NeoPa
32,556 Expert Mod 16PB
Julio, your first attempt seems fine to me. There is little point in using the Like operator when = will do just as well, but this won't actually cause any problems.

If the results are not as expected then you need to look at what you are expecting and why. Unfortunately, with the limited info available to us, there's little we can help with on that score.
Dec 19 '12 #4

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

Similar topics

2
by: Vikrant | last post by:
Hey Friends I need to export an Access Report using a filter. I am using the method OutputTo m_pDoCmd->OutputTo( 3, // asOutputReport COleVariant(strReportName), // <report name>...
4
by: ShyGuy | last post by:
I have a table with 4 fields. Three are used for criteria. I can get the DLookup to work with 1 criteria with the following but can't get it to work with 2 or three. NumofAppts = DLookup("",...
5
by: Sami | last post by:
I can create queries and reports based on info from one table. How do I create one using information from multiple tables. What do I need to make sure the information from one table will be...
14
by: Scott Gorman | last post by:
I have a report with a sub report for an income / expense report for church. My expense report is the sub report. My question is, when I run the report, it prompts me 2-3 times for the parameters...
0
by: George | last post by:
I have a Microsoft Access report and I have automated this report using C#. When the report opens (via DoCmd.OpenReport) I am confronted with several prompts for criteria (example: "Please enter...
4
by: ApexData | last post by:
I have one table used to maintain information on Service Events. Each record contains a Repair, Maint, and Battery checkbox (bound/boolean). Any one of these fields may be checked or left empty....
1
by: 2D Rick | last post by:
I want to open a report using OpenReport and passing it a Where Clause with multiple criteria. I know the Where Clause below is way off but it conveys what I need. Dates are of string type. ...
0
by: ChadK | last post by:
I am trying to open a report based on what the user selects on a form. Each individual criteria works but when I try to combine to pass multiple criteria it doesn't. I have read what I can find on...
7
by: Ceebaby via AccessMonster.com | last post by:
Hi All Here's hoping someone can help me with this. I have a report based on a query where the criteria for 4 of the fields is set from an unbound form. I want the user to be able to select any...
1
by: gwise | last post by:
I have an access database that is for a manufacturer. There are multiple process that each one of their jobs has to go through in order to be completed. They want to create a report that shows them...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.