Group Data In Qry

Feb 28, 2008

Hi, in the qry attached I would like to group the records by yyyy mm int the field "Year month" I need then to count the number of records in HOTAC which have value "yes" the sum of "Total Flight Time" and finally the count of records that contain the letter F or P in the "Duty" field.
Example:

Year Month Hotac Flight Time Duty
2007 05 0 2.18 2
2007 06 8 XX 2

How can I get that?

View Replies


ADVERTISEMENT

Qry To Group & Sum All Data But Only Returning The Location Of Where Max Pts Was

Jan 21, 2007

I have 1 table with multi Text columns (location, coaches,ssn etc), and
multiple Num columns (pts and product counts)

I need to sum all the unit counts & points for each person, but only
bring back the location for each person that had the 'max' sales (pts).

ex. ssn xxxxxx has 3 sales codes : code 1&2 had less sales aquired
then sales code 3. Sales code 1 was location Vt, slsCd 2 was location
CA and slscd 3 was location FL. I need to bring back the sum of all
three codes but only the location FL as it had the most sales pointing
to it.
I have deadline of Monday to get this done.PLEASE help

View 2 Replies View Related

Data Entry Using A Query With A Group By/Sum?

Oct 7, 2004

My boss wants me to create a form based on a query with a group by. He says it can be done, but I haven't figured it out. Any tips? TIA!

View 4 Replies View Related

Group Data In A Dynamic Report

Jan 6, 2005

Hi guys,



I’m creating a report on which I want to group data base on a field that has two different data one is KEY and OTHER. Now I need to be able to show on the detail section all records base on KEY, and group the rest of the records by OTHER.



Can anyone help me please?



Million of thanks

View 2 Replies View Related

Group Data Into Arbitrary Time Periods

Oct 18, 2006

I am new to Access and would be very grateful for some adivce on setting up a query.
The data in the table below comes from a photon counter. Both fields are numbers although TIME actually represents seconds.
I need to be able to group the DATA field by arbitrary TIME periods. e.g. to divide the table up into bins of, say, 8.7 seconds length, showing the total accumulated in the DATA field for each successive period of 8.7 seconds.
The tables are about 300,000 records long.
Any help would be much appreciated.

Thanks,

TIME - DATA
285748175.864557 - 100
285748175.874556 - 100
285748175.884556 - 0
285748175.894557 - 100
285748175.904557 - 0
285748175.914556 - 200
285748175.924556 - 300
285748175.934556 - 0

View 7 Replies View Related

Queries :: IIF Statement - Group Data In Range

Nov 7, 2014

I need to group data (cases) in range like this (0-5, 6-10, 11-15 etc).

I can do this with the iif statement but this is a bit tedious.

I have two simple table:

1. Salestbl with two fields: a. customerid, b. Cases
2. Rangetbl with two fields: a. Range b. Category

The rangetbl is where i would define my range and it look like this
the range field have records 0,6,11 with corresponding category which look like this '0-5', '6-10', '11-15'

How can I use this to group my data. that is customer with x cases have group '0-5' or '6-10' etc....

View 3 Replies View Related

Group By Data From Different Tables Based On Two Sums

May 23, 2014

I have 2 tables and one query as below

1- Order Table

OrderID | CustomerID | CusromerName | OrdDate

2- Payment Table

OrderID | Amount | PYMDate

3- Order Deatails Query

OrderID | ProductName | Quantity | Price | Total ([Quantity]*[Price])

I want to group the orders based on the sum of total and sum of payments. I made another query as following :

OrderID (From order table) | Payment (from payments table) | Total (From Order Details Query )

At the Total field I set the above fields to

Group By, Sum

and Sum respectively

I got true payments sum, however, the sum total are always duplicated.

Note that the three objects (two tables and query ) have relation (type : one to many) by the order ID

View 10 Replies View Related

IIf Statement Used For Sorting Data Based On Option Group

Jan 10, 2006

Hi all,

My problem is as follows:

I am trying to generate a report, which is based on a query, which references a form that has an option group containing four options.

I want to sort the data according which option group radio button has been selected (they the values of 1,2,3,4).

Originally there were only 2 options and the query said (in SQL view):

ORDER BY IIf(Forms!frm_08_reportsort!opt_sort_by=1,TBL_Acco untManager.Name,TBL_SiteContactDetails.SchoolName) ,

This works fine for 2 options, but I can't figure out what command i should use for more than 2 options :confused:

Any help would be much appreciated :)

View 3 Replies View Related

Forms :: Option Group Not Showing Table Data?

Jan 29, 2014

I have an Option Group I created (simple Yes-No) in a form that links to a Yes-No field in a table. I have the default set for this field to "Yes" in the form. The option button works when the form is first opened. If I cange the option to "No", that works. Here's the tricky part that is giving me eye twitches...

If I change the option back to "Yes", the radial button doesn't reflect the change...but it does change the table data! Why do the radial buttons stop changing? Even when I close the form and open it again, the data in the table is no longer reflected with the buttons in the form.

I have 64-bit, Access 2010.

View 11 Replies View Related

Forms :: Option Group Data Not Being Saved To Table

Jul 14, 2013

Not all the choices (numeric codes) for my form's option box are being saved to the associated table.

I am using the options choices in the option group to enter data into a table and do additional things - clicking one option is supposed put a code in the table and then take you another form, while clicking a different option will make a new option box visible so I can collect additional data.

My option group has three options, only the data from the second option, which makes a second option group visible, is being saved in the table. If someone clicks on the first or thrid option, which takes them to another form, the data from that option choice does not get saved to the table.

View 2 Replies View Related

Reports :: Sum Group Items By Specific Item And Hide Details Of Group Summing

May 29, 2015

Despite Google I can't seem to figure this out.

I have some data in a format similar to:

Name / Style / description / speed / distance
john / driver / careful / 80 / 5500
mary / driver / careful / 70 / 7000
pat / racer / reckless / 100 / 6000
anne / driver / careful / 75 / 1000
peter / racer / reckless / 110 / 6500
don / snail / slow / 60 / 6000

I want my report to total by style, without details and to look like:

driver careful 13500
racer reckless 12500
snail slow 6000

How do you get a report to sum the group items by a specific item and to hide the details of that group summing?

View 2 Replies View Related

Queries :: Compare Data In 3 Fields In 1 Table / Group By Largest

Dec 4, 2013

I'm trying to create a query that will compare the data in 3 fields in a record, choose the largest (I also have a criteria to order by if more than 1 field has the same entry and it's the largest of the 3), and then group by that.The fields I will need are as follows:

PRODUCT table:
ProductName
Chemical
ChemicalAbstract
PhysicalState
NFPAHealth
NFPAFlammability
NFPAReactivity

qryQuantityOnHand query (which doesn't link directly to the PRODUCT table, it links through associations with other tables):QOH...I will eventually need information from another table for the final reports, but I don't think it has to be included in this query.

The fields NFPAHealth, NFPAFlammability, and NFPAReactivity each may be 0, 1, 2, 3, or 4...I need to ignore blanks; if 1 of the above fields is blank, they will all be blank.For any record, I need to compare the number in those 3 fields to each other, and choose the largest number and group by that rating.

In other words, if the largest of the 3 numbers is a 3 in the NFPAFlammability field, all those products need to be grouped together.If the same number appears in at least 2 of the fields, the order that determines the grouping is: Flammability, then Health, then Reactivity..Ultimately the report will be grouped as follows:

Flammability
Rating 4
Product 1
Product 2
Product 3

Rating 3
Product 1
Product 2
Product 3

Rating 2
Product 1
Product 2
Product 3

Health
Rating 4
Product 1
Product 2
Product 3

[code]....

and each of the groups will be sub-totalled.I'm stumped at trying to create the query in the first place.The added aggravation here is that we are dealing with 23 stores, each with their own mix of products. I have another table that contains the information about which products are in which store.

View 4 Replies View Related

Reports :: Hiding Field That Is Only For Sorting Purposes To Group Data

Sep 24, 2014

I have a table of about 250 items that are sorted based on two fields. I created a query of the table and hide one of the fields because it is only there for sorting purposes to group the data.

For example, I have a "Type" field. In the type field, I differentiate the items with different categories, such as "Materials", "Safety", etc. My next field is "subtype" which assists the "Type" field being sorted properly for my needs. In the "Materials" category, all of the items are either "Fencing", "Plastic", "Wire", or "Miscellaneous". I am sorting the "type" and "subtype" fields in ascending order so that all the "materials" are grouped together, and all of the "fencing, "plastic", etc are grouped together within the materials field.

I am creating a printable report and I do not want the "subtype" field to be on the report, but I need the "subtype" field's sort to be affecting my data so it is grouped properly. I'm having difficulty, is there a way to hide fields in reports?

View 3 Replies View Related

Reports :: Control Group Expression For Group In Report?

Mar 28, 2013

Is there a way to have an expression in the control source of a text box in a report, that re-starts or is exclusive for every group within the report?

View 5 Replies View Related

Queries :: Group And Display Data On Weekly Basis Starting On Sunday

Apr 2, 2013

I'm trying to group and display data on a weekly basis starting on Sunday. I'm using the following in a totals query with "Group By" Week Number: DatePart("ww",[Date])

My problem is that the results are returning some unexpected things.. March seems to have 6 weeks and the query is returning two months containing week number 14.. (as shown below).

2013 March 9
2013 March 10
2013 March 11
2013 March 12
2013 March 13
2013 March 14
2013 April 14

View 4 Replies View Related

Reports :: Group Data In A Report From Single Table Using Grouping And Sorting

Dec 2, 2014

I'm trying to group data in a report from single table using grouping and sorting and I want the percentile of every record over group total. I'm using a query to fetch data from table, however I'm unable to get percentage of every single record over group total.

I want to display the report as attached image in single report. I'm unable to get data in "Perc" field. It's populating wrong values.

View 3 Replies View Related

Queries :: Group Financial Data To One Main Table - Round To 2 Decimal Places

Feb 25, 2014

I have about ten append queries to group various financial data to one main table.

I have used the round function (iff (Round(Nz([FIN_data]),2)) in the queries to round the original data into 2 decimal places but there is still one or two lines exceeding 2 decimal places.

What is the better approach to have only 2 decimal places for all append data?

View 4 Replies View Related

Forms :: Permit Only 50 Group Leaders To Input / Edit Data On Password Protected Forms

Jul 29, 2015

I am building a very comprehensive Membership Management Database with extremely useful facilities initiated by some 20 or 25 Queries..

The database includes 5 Tables which store data relevant to members, another which stores details of Interest Groups and a 3rd which stores which members are affiliated to which Group or Groups.

Currently the database is accessible only by a very limited number of persons and data can be entered/edited by only one person. The database, using Access 2010, is maintained on a desktop computer and synchronized to a copy on a Cloud.

My requirement is to permit some 50 Group Leaders to input/edit data on a Password protected Group Members Form such that that is the only element of the database that they can access. The Forms would have only 2 fields from which the user would select entries from drop down lists.

My query is ; is such a procedure feasible in principle and would I be correct in assuming that the user would require to have available a copy of Access.

View 7 Replies View Related

Forms :: Option Group - Warn User When Neither Of 2 In Option Group Not Ticked?

Jul 25, 2013

I stumbled upon the Option Group function just yesterday and, happy as a clam, I created a group with 2 options in radio button style. I assigned the values to a field called Registration_Type as the 2 options are "Confirmed Registrants" and "Prospective Attendees".

[Great. That part works well. When I look at the table, a 1 or a 2 is in that field so it's great to know how to control accidental ticking of radio buttons (previous 450 records or so didn't have this option group functionality so one might easily tick one of the buttons. So one part of controlling option group I know I can handle via the table itself for now.]

The challenge is how to ensure the user always ticks one or the other ... I went back to the main table and tested the 'required entry' option for the Registration_Type field but forcing an action like this is not ideal in my mind. The usual error message vagueness for the average user is no good and I don't want to limit the user so much.

Is there a way to simply have a popup come up warning that neither radio button was ticked? Perhaps something linked to the form - i.e., maybe "after update"?? I only learned about attaching code to before and after update on controls a couple of days ago, so not sure if this would be best approach.

Just something to let the user know that nothing has been ticked in the option group as that controls in which of 2 reports the data will show up in so any record not ticked might mean a registrant being left out, which would be rather disastrous <g>.

View 1 Replies View Related

SUM And GROUP BY

Mar 12, 2007

I'm trying to create a Query. I have a field "Name" from the table "Products" and the field "Quantity" from the table "Deliveries". Currently, The same product name will appear several times with their quantities. I want to SUM all of those quantities together and only have the Product name appear once. If it's a diffrent product name, then sum all of it's quantities together etc. I'm having a tough time writing a proper formula, It either has syntax errors or produces more than one field, which I don't understand. I need a formula that I can insert into the design view of the query. This formula will also create a new data field to hold the information. Can anyone help?

p.s. Do I have to use SELECT for both Name and Quantity? Where do I insert GROUP BY? I'm so confused!! I've tried things like (SELECT Name, (SELECT SUM(Quantity) FROM Deliveries) FROM Products....by now where am I supposed to write GROUP BY???

View 5 Replies View Related

Top N Per Group

Mar 22, 2008

I know you have probably seen this a trillion times, but being new to all this, it is discouraging to say the least! Please help...

I think maybe I should upload the database, let me know.

Here are the names:

Table name: PPM Data

Fields:
Company
PPM Month
PPM Amount

There are 10 different companies, and I need top 6 months data per each Company, to eventually only show the 6 amounts. I have tried all the equations I can find. But I don't think I am doing it right. I have tried to make 10 different queries for each company and than tried to join those queries, and that just didn't work.

I have tried Allen Browne, confusing, and I have tried Acc2002 for their equations for Top N per group, I still can't make out what they are saying without the actual database to look at.

View 6 Replies View Related

Group

Sep 13, 2005

Hi,
i have a combo box that query a tabel to get the date's i chose from but she repeat the samedate if i have a 2 records with date 12-9-2005 i see 2 in the combo box ho i can join them to see only one date fron them

View 1 Replies View Related

Can't Group On Memo

Jan 18, 2006

I have a field on a table that is a memo field. I am trying to write a query to include this field but get the "Can't group on memo or OLE object. Any ideas on why and how can I query with this memo field included?

View 2 Replies View Related

Show Top 2 By Group

Feb 11, 2006

I'm trying to view the last two valuations for each property so that they can be compared. I can pull out the last valuation for each property and can pull out the top two records but not for each property, just shows me the top 2 of all records.

Any suggestions?

View 5 Replies View Related

Group Permissions

Feb 28, 2005

Hi, I have just made my maiden voyage on the good ship "Security Wizard" and the water has been a little rough but as yet I still have my sea-legs intact!

Slight problem though... I want users to be able to add data to a table but not to be able to view the whole table if they try and open it in the database window. Now I know reasonable measures would just hide the DB window but I have the threat of Data Protection Auditors looming over me becuase management "forgot" to tell me security was required and it has already been breached before I used the wizard.

Anyway, I did some research on here and I found a method whereby I can set the table so only I have permission to view/add data, then I can get users to add data via a query with permissions set to Owners.

I'm really hoping that someone will come to my rescue and tell me that there's a much easier way than that...

Please....

Anyone....

Thanks, Tom.

View 1 Replies View Related

GROUP BY Just One Criterion

Jun 11, 2005

I need to execute this query from an ASP . Net page. I'm connected to an Access 2002 DB.

SELECT tblBudget.GroupCode, tblBudget.GCDescriptioon, tblBudget.Amount
FROM tblBudget
GROUP BY tblBudget.GroupCode, tblBudget.GCDescription, tblBudget.Amount
ORDER BY tblBudget.GroupCode;

If I delete tblBudget.GCDescription and tblBudget.Amount from the "GROUP BY" instruction it does not work.

What I want to do is that in case tblBudget.GroupCode is repeated (e.g. several records with the same group code) I want to display only one line summarizing all info for the given group code.

Thank you

View 1 Replies View Related







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