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 Replies


ADVERTISEMENT

Queries :: Create A Query That Can Run On Weekly Basis And Save Results To Excel Spreadsheet

Feb 18, 2014

I have a database of around 15,000 users and I'd like to create a query that I can run on a weekly basis and save the results to an Excel spreadsheet. The results need to be logical and understandable by my coworkers.

Unfortunately, the actual results of the query are not (in their raw form) logical or easy to interpret.

Let's say I have a table called "users" and within that I have:

Surname
Forename
FieldA
FieldB
FieldC

FieldA has a value of either NULL or a 12-digit number
FieldB has the values are "ENABLED", "DISABLED" and "N/A"
FieldC contains a value of either "1" or NULL

This means nothing to my coworkers who want each user to be sorted into a "category". As I'm running this on a weekly basis, I'd like this query to do the work for me, so I don't have to manually assign everyone to a category in Excel. Plus, of course, there is no chance of human error if the query does this for me.

Sooo... I'd like my query to categorise for me as follows:

Category1 = FieldA IS NOT NULL and FieldB="ENABLED"
Category2 = FieldA IS NOT NULL and FieldB="N/A"
Category3 = FieldA IS NULL and FieldB="ENABLED"
Category4 = FieldA IS NULL and FieldB="N/A"
Category5 = FieldA IS NOT NULL and FieldC = 1
... etc.

I'd like the final column in the query results to simply list the category name, so I can simply copy and paste the data into an Excel spreadsheet and be done with it, safe in the knowledge that it makes sense to all.

View 14 Replies View Related

Queries :: Daily Activities - Group As Weekly Total And Transpose For Reporting

Jun 5, 2013

Query of daily activities spent hours

1) to be group as weekly total
2) then need to transpose it for reporting.

My table fields are Date, SpentHrs and Code (activity code description).

View 11 Replies View Related

Queries :: Making Bird Count Database - Data Recorded On Monthly Basis Week Wise

Feb 21, 2014

I've been requested to make a bird count database.

The bird count data has been recorded on monthly papers like this:

[bird name] [week 1][week 2][week 3][week4]

The number of birds sighted for a given week is written in the [week x] columns.

What I need to do is make another column that shows whichever number is highest from columns [week 1], [week 2], [week 3], [week 4].

So for example:

Blackbird: Week1: 4, Week2: 2, Week3: 6, Week4: 2

highest: =6

View 5 Replies View Related

Display Dat On Basis Of Combo Box Selected Value

May 31, 2006

Hi

I am posting this question again, as I think there was some miscommunication from my side. I sinccerely apologise.

Actually there are three fields on a form.

1. Combo Box : Label is Name
2. Text Box : Label is Code
3. Text Box : Label is Department.

These three fields are stored in the table.

I wants that when the form gets loaded, then in the combo box field all the names from the table should appear. When I select the particular name from the list and the focus is lost from the combo box then the two values from the table should show the corresponding text boxs.

Thanks in Advance

View 3 Replies View Related

Display Dat On Basis Of Combo Box Selected Value

May 31, 2006

Hi

I am posting this question again, as I think there was some miscommunication from my side. I sinccerely apologise.

Actually there are three fields on a form.

1. Combo Box : Label is Name
2. Text Box : Label is Code
3. Text Box : Label is Department.

These three fields are stored in the table.

I wants that when the form gets loaded, then in the combo box field all the names from the table should appear. When I select the particular name from the list and the focus is lost from the combo box then the two values from the table should show the corresponding text boxs.

Thanks in Advance

View 1 Replies View Related

Queries :: Query Group By And Display Other Columns

Sep 2, 2013

I have a table with 4 columns :

Product Price Quantity Supplier

Product1 5 240 A
Product1 7 19 B
Product1 6 12 C
Product2 96 0 A
Product2 98 23 B
Product2 99 44 C

There are 3 suppliers for the products (name of the suppliers are A, B and C).I want to make a query with the following result :

Product1 5 240 A
Product2 98 23 B

In other words :Showing a grouped list (grouped by products), with the lowest price of the supplier who has stock (quantity >0).I can make a list of grouped products with the lowest price, but it's not possible for me to show the stock and the supplier that's related with it.

View 2 Replies View Related

Queries :: Add Or Subtract One Day If The Date Is Sunday

Jul 14, 2014

I have a table contains
1. full name
2. email
3. date

I want to make a query that will contain
1. full name
2. email
3. date1
4. date2

The date2 will be date1 + 90 days

So if the result is a sunday i want to add one day or subtract one day automatically...

View 7 Replies View Related

Queries :: Calculate Fee For Each Student On Monthly Basis

Jul 23, 2013

Me having a db which is having a student table which is keeping all student info, second i have a Van table which is keeping van info. I wanted to know how it is possible to calculate monthly van fee for each student on monthly basis which db do it itself based on system date/time and calculate monthly required fee for each student. I also would like to know that if a student do not pay in a month then checking the next month or checking unpaid student through date criteria it displays all due amount may be in sum.

View 2 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

Queries :: Return Week Number On The Basis Of Date

Jan 23, 2014

I've been trying to create a query that will take a date and return the week number of the date.

My original date is formatted m/d/yyyy

I need my weeks to start on Monday and I would like the week containing Jan 1st to be the first week of the year

I have tried using the following function:

DatePart("ww",#12/31/2001#,2,1)

but the I get a result of 53 in this query, when I expected/need it to be 1.

View 4 Replies View Related

Queries :: Query To Select The Date From Two Tables On The Criteria Basis?

May 21, 2013

get the data from two tables on the basis of criteria...

I want to select the whole table1 which has 6 fields including Emp_id...

I want to select the single field from table2. field name is "Username" from second table2. will select the username on the basis of Emp_ID becaue both tables has same emp_ID.

It should be in order like. Emp id, Username, Startdate, Enddate, Hours, trainingNames.....

View 1 Replies View Related

Queries :: How To Retrieve Only Numeric Data From F1 And Display That Data In A Field

Oct 1, 2013

Background I have a query (Q1) that retrives data from a table (Table 1). One of the fields in Table (F1) contains both text and numeric data (ie: 24 eggs). I want to separate these values in Q1.

Questions
How can i in Q1 retrive only numeric data from F1 and display that data i a field?
How can i in Q1 retrive only text from F1 and display that data i a field?

View 3 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

Queries :: Save Weekly Changes To A Table

Nov 18, 2013

We import data to a table on a weekly basis. We delete the table and replace the data. Most of the data is the same. It's date's, group names, ...

Now we would like to save the weekly table and add a saved date. Then we would like a query that puts all the saved tables together and that we could filter.

For example. A team is planned to do a work on 01/01/13. The next week it has changed to 07/01/13. So the data in the table it updated but we can't track the changed date. If we had the different tables we could filter that team and so that the work was originaly planned on date x to be done on the 01/01/13, on date y it was 07/01/13....

Of course if we would save the complete table every time it would mean a lot of useless data that hasn't changed. So a better solution would be that a query could see which data has changed and it only saved those lines on that date.

View 11 Replies View Related

Too Many Fields - One Year Of Weekly Sales Data

Sep 6, 2007

I'm new to Access, and I've been able to figure out a way around most of the problems I've run up against, but this one has me completely stumped. I would really appreciate any help!

I need to create a query that will produce a report that will follow the sales performance data of new agents for one year. I need to have two pieces of data for each week: number of policies sold and total value of policies.

The format looks like this:

Jan1 Jan2 Jan3 Jan4 Feb1
Number 12 4 6 3 6
Value 1554 320 229 221 1824

I have been pulling weekly sales data from an external database weekly and importing it into individual tables in my Access database. I had no problem for the first 3 months, but now I am getting the error message "Too Many Fields". If I understand it right, you can have up to 255 fields in a query. I don't have anywhere near that many. What could be wrong?

Any suggestions would be greatly appreciated!

View 2 Replies View Related

Queries :: Weekly Query That Update Reports

May 16, 2014

I have made a query that was supposed to update my reports every week with new inquiries that we get.

I thought i had solved this but when i opened the report this morning, it's just showing last week's.

I have this as the criteria:Between (Date()-7-Weekday(Date(),2)+1) And (Date()-Weekday(Date(),2)+1)

It's probably wrong.

View 7 Replies View Related

Queries :: Importing Spreadsheet On Daily Basis - Detect / Remove Blank Columns

Sep 18, 2013

I am importing a spreadsheet on a daily basis that has the same columns in every time but depending on the company I am importing it for different columns will be blank and not needed each time.

What is the best way of detecting and removing blank columns.

View 3 Replies View Related

Queries :: Crosstab Query By Month - Report On Claims On Paid And Incurred Basis

Apr 7, 2013

I am creating a crosstab query in VBA to report on claims on a paid and incurred basis. I would like the query to have 13 columns - one for each month of the current year and one for all claims paid prior to January of the current year.

Is there a way to lump all data with a date less than Jan 1 into a single field while retaining the monthly detail for the current year?

All of the data is coming from a single table. Sample code below functions, but provides a column for every month a claim was incurred.

Sub Triangle()
'Triangle Reports
'Check Registers

On Error GoTo Error_Handler:

Dim DB As DAO.Database
Dim RS As DAO.Recordset
Dim QRY As DAO.QueryDef

[Code] ....

View 4 Replies View Related

How To Get Data With A Starting Letter.

Jun 14, 2005

I want a criteris in access to get the records having field2 starting with "num".

number
numbiur
numg
numds
the first three letter should be num

View 1 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

Queries :: Linking Weekly Rota System To A Date

Oct 4, 2013

I have a staff rota system that works on a rolling 4 weekly basis. I am using a table to store the shifts of a person dependent on week. I want to be able to tell access that Monday on week 1 corresponds to a certain date and then get access to figure out the rolling system based on that date.

eg Monday 21/7/13 is week 1 (7 days later it knows it is linked to week 2)

This is so if a staff member is off sick I can say they were off sick on the 24th and it will populate their timesheet with the corresponding shift without me having to input it manually. Doable?

View 1 Replies View Related

Queries :: Create Sums Based On Weekly Range?

Jun 26, 2014

I'm creating a query for a someone who wants quantities summed by a weekly range and correspond to a week number. This person wants Access to do something that is a simple function on Excel.

I have no clue how to do this or if Access is even made to do something like this.

This is an example of what I have so far

Quote:

P/N QTYWork DateWW (Work Week)
25COMP16/11/201428
25COMP26/20/201425
25COMP27/9/201428
25COMP36/20/201425

....And so on

My code is

Code:
SELECT dbo_JBKLG.JKPRT AS P/N, dbo_JOB.JBQOR AS QTY, CDate(Mid([JKDDT],5,2) & "/" & Right([JKDDT],2) & "/" & Left([JKDDT],4)) AS [Work Date], DatePart("ww",[Work Date]) AS [WW]
FROM dbo_JBKLG LEFT JOIN dbo_JOB ON dbo_JBKLG.JKJOB = dbo_JOB.JBJNO
GROUP BY dbo_JBKLG.JKPRT, dbo_JOB.JBQOR, CDate(Mid([JKDDT],5,2) & "/" & Right([JKDDT],2) & "/" & Left([JKDDT],4))

There are more part numbers and the data from the other parts must be in the same format in the same query.

Quote:

P/N QTY WK WW

25COMP 15506/09-06/15WW24
25COMP 22706/16-06/22WW25
25COMP 16006/23-06/29WW26
25COMP 20006/30-07/06WW27

.....And so on

View 14 Replies View Related

Use A Query To Do A Running Total & Comparison With Weekly Data Points

Apr 13, 2006

I am a newbie, so please forgive me for such an easy question, but I am stumped. I attached a text file that shows the data I am working with. What I need to do is take each product (labeled Prod) and do a weekly sum on the quantities and compare against a set number to see if the quantity is lower or higher. For instance, I need to take column 12, regardless of value and compare it against set number. If the quantity is less, then I need to add the value of column 12 to column 13 and compare the summed value against set number. Again, if the sum is less than set number, I then need to take the value of column 14 and add it to the summed value of the previous step (sum of 12 & 13), then compare this new sum to set number. This process keeps taking place until I reach a summed value that is greater than set number. Once that happens I need to identify the column that sent me over the set value and hold that data. For instance, if column 33's (out of 52) summed value takes me over the set number, I want to know that it was column 33, so I can run further calculations against that value. The column header's are week numbers and I need to identify order points based on lead times and when I will run out of material. Is this beyond queries? I think so, but if it is, I don't know how to exactly begin the code in VBA either. I think I would use an If then Else stucture with a counter switch set from 1 to 52, unless comparison exits function, but not certain. HELP?????:confused:

View 3 Replies View Related

Reports :: How To Build Weekly Report Even When No Data Exist For A Week

Jun 11, 2013

how to build a weekly report to count the number of computers that have entered a defined process. I have four processes and I need the report to show counts for each process even if it's zero. The report is supposed to show the history of each process and not just the current week. Is this possible to do in a single query? Or do I have to make multiple queries?

I have a table that holds the history of each workstation including the workstationName, date of the record, the phase of the workstation, and the status of the phase. Another table holds the phase codes and phase statuses for lookup purposes.

View 2 Replies View Related

Modules & VBA :: Automating Data Entry For Weekly / Biweekly Dates

Oct 24, 2013

I am trying to write code for a form. When the user enters the "Number of Payments" and the "1st payment date" it will fill the amount of the payment into a specific month.

For example: 1st payment date would be 10/24 the payments would be bi-weekly and the amount would be $50.00. The number of payments would be 4. I would need it to put $50.00 into a field called "October" $100.00 into a field called "November" and $50.00 into a field called "December". In excel I would do this simply by using a (date)+14 formula. I am sure that I need to do this with loops but where to even begin.

View 1 Replies View Related







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