473,803 Members | 3,022 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help: Grouping dates in query

I'm building a report where each row represents one month and its 1 to
5 weeks. A report query groups the source table date into a "month and
year" expression. A subreport links to the main report using the
query's "month and year" expression.

Problem is I can't figure out how to group the source table's dates
into a "Mmmm yyyy" and then link the subreport to the relevant week of
that "Mmmm Yyyy".

source table:
tbl_Promotion
Street_Date
Promo_Name

report output:
(line 1) November 2004, [week1] promos, [week2] promos...
(line 2) December 2004, [week1] promos...
(line 3) January 2005, ...

Note that "[week#] promos" is the linked subform showing the exact
promo date from the source table.

Any help is greatly appreciated!
Nov 13 '05 #1
1 1594
"John" <so*********@ho tmail.com> wrote in message
news:90******** *************** ***@posting.goo gle.com...
I'm building a report where each row represents one month and its 1 to
5 weeks. A report query groups the source table date into a "month and
year" expression. A subreport links to the main report using the
query's "month and year" expression.

Problem is I can't figure out how to group the source table's dates
into a "Mmmm yyyy" and then link the subreport to the relevant week of
that "Mmmm Yyyy".


The best way to handle these sorts of temporal problems is often to build
and populate a separate calendar table to hold all the individual time
slices you are ever likely to need - then join to this table in your
queries. This gives much better performance than grouping on a calculated
value.

If you need some help with specific syntax post your simplified table
structure with some sample data and the output you need.
Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4786
by: John Segars | last post by:
I have to identify students who have attended more than one school within a school district in the same academic year between certain dates. I have a table with stuID, enterdate, leavedate and want to add field "acctStatus". I need to update the AcctStatus field with a value to designate those students who enrolled by 10/14/2002, attended more than one school, and either did not leave (leavedate will be NULL) or left after 5/1/03. These...
3
1704
by: Miguelito Bain | last post by:
hi- i have a simple table. i have 3 fields, id, indate, and outdate. i want to group these fields in my report by month. for example, for february 2004, i want to display all the ids and dates for those records with indates during the month of february. i'm trying to get my report to look kind of like this... MONTH CASEID INDATE OUTDATE
2
4555
by: Alicia | last post by:
Hi, I am trying to group by week and do a count of my data in between the dates. In Microsoft Access. Something similar to Before: Date Count --------- --------- 10/02/04 2
4
1742
by: Alicia | last post by:
I am having a problem grouping by week. I am looking for the simpliest way of doing it in Microsoft Access. I have tried to use a pre-loaded calender, access did not like it at all. If there is another way of counting the number of ProblemCounts with a single week, by using DatePart etc. Give me a shout. Thanks. Something similar to Before:
5
2396
by: Alicia | last post by:
Yes, but will that skip a week and group by the date for me? I basically wanted something that would do a count of the dates, then group them by their week name.. BEFORE: Resource Date Total number of times that date Appeared (Count) 4/3/03 4 4/4/03 2 (note 4/4/03 showed up twice)
3
2745
by: ahaque38 | last post by:
Hello. Using A2K SP3, I am having the following problem with a report using "Sorting and Grouping". I have recently added a grouping in the reports for "Category2<>'CONTRACTS'". I have reports at the plan (overall totals), department and division levels which have sorting and grouping implemented with this new
5
3038
by: Peter Bailey | last post by:
I have a query that returns , and : 12/05/04 3 Wednesday 13/05/04 0 Thursday and so on what I would like to do now is count the number of bookings by week so from monday to friday from the first date get the sum of bookings.
0
3742
by: Megan | last post by:
Data Comparison: Sample Versus Rest of Population. I have a population of data, and I want to take a sample of that population and compare it against the entire population. I have a database that records information about the types of Rulings a person receives. Each person works for an agency, and there are 12 agencies (see example below). Each person receives a ruling, and there are 2 types of rulings,
16
2823
by: Rex | last post by:
Hi All - I have a question that I think MIGHT be of interest to a number of us developers. I am somewhat new to VIsual Studio 2005 but not new to VB. I am looking for ideas about quick and efficient navigating within Visual Studio 2005. Let's say your project (or solution) has dozens of forms and hundreds or even thousands of routines. Two Questions: 1) BUILT-IN to Visual Studio 2005. What ideas do you have to quickly
0
9700
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9564
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10310
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10068
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9121
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6841
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4275
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2970
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.