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

Access Report

I need to create a report using data in a date field as a header. The field is a week ending date with a corisponding hours worked for an employee. The report needs to list the fields as follows;

Week Ending 01/05/08 01/12/08 01/19/08 etc
John Doe 40 40 25 etc
Jane Doe 45 20 40 etc

I have seen some posts about doing this with a query but no clear explanation on how to do it.

Any help would be appreciated.
Jan 14 '08 #1
11 1229
Rabbit
12,516 Expert Mod 8TB
You're looking for a crosstab query.
Jan 14 '08 #2
You're looking for a crosstab query.
OK I built a cross tab query now I need to be able to prompt the user for a date range on the week ending but the Between expression comes back with an error

Between [Start Date] And [End Date]

The Microsoft Jet database does not recognize "[Start Date]' as a valid field
Jan 14 '08 #3
Rabbit
12,516 Expert Mod 8TB
What's the whole SQL?
Jan 14 '08 #4
What's the whole SQL?
Not sure what your looking for this is an Access DB and I am using the expression on the same field I am making column headers with.
Jan 14 '08 #5
Rabbit
12,516 Expert Mod 8TB
In the query builder, right-click the title bar of the query builder window and select SQL view. Copy and paste what's in there.
Jan 14 '08 #6
In the query builder, right-click the title bar of the query builder window and select SQL view. Copy and paste what's in there.
Sorry Rookie Here it is
Expand|Select|Wrap|Line Numbers
  1. TRANSFORM Sum([Resource Hours].Hours) AS SumOfHours
  2. SELECT [Resource Hours].[Employee Name]
  3. FROM ([Shop Codes] INNER JOIN [Dep Code] ON [Shop Codes].[Shop Code] = [Dep Code].[Shop Code]) INNER JOIN ([Work Center] INNER JOIN ([Resource Detail] INNER JOIN [Resource Hours] ON [Resource Detail].[Employee Name] = [Resource Hours].[Employee Name]) ON [Work Center].[Work Center] = [Resource Detail].[Work Center]) ON [Dep Code].[Dep Code] = [Work Center].[Dep Code]
  4. WHERE ((([Resource Hours].[Week Ending]) Between [Start Sate] And [End Date]))
  5. GROUP BY [Resource Hours].[Employee Name]
  6. PIVOT [Resource Hours].[Week Ending];
  7.  
Jan 14 '08 #7
Rabbit
12,516 Expert Mod 8TB
You'll have to define the parameters under Query > Parameters.
Jan 14 '08 #8
You'll have to define the parameters under Query > Parameters.
Will that give me the ability to prompt the user?
Jan 14 '08 #9
Rabbit
12,516 Expert Mod 8TB
Will that give me the ability to prompt the user?
Yes it will.
Jan 14 '08 #10
Yes it will.
Thanks for your help this will work great.
Jan 14 '08 #11
Rabbit
12,516 Expert Mod 8TB
Not a problem, good luck.
Jan 14 '08 #12

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

Similar topics

3
by: Nicola | last post by:
Hi Everyone, I am new to programming and would like to know how to open an access Report from within vb 6. I am trying to write a program to organise cross stitch threads. I have found out how...
1
by: Joris Kempen | last post by:
Hi people, I know that the question has come around sometimes: How to open an Access Report using ASP and export it to for example RTF. I'm trying to implement the first method of David...
20
by: John | last post by:
Hi, I've recently upgraded from Access 97 to Access 2002 & the performance basically stinks. I have tried the following items listed below but it has only had a minor impact: 1) Upgraded Jet...
8
by: Mike MacSween | last post by:
tblCourses one to many to tblEvents. A course may have an intro workshop (a type of event), a mid course workshop, a final exam. Or any combination. Or something different in the future. At...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
2
by: Dean Slindee | last post by:
Anybody written code in VB.NET to: 1) show a print preview window of reports already written and stored in an Access 2002 database; or 2) execute the print of a report stored in an Access 2002...
6
by: Bob Alston | last post by:
I am looking for Access reporting add-in that would be easy to use by end users. My key focus is on selection criteria. I am very happy with the Access report writer capabilities. As far as...
2
by: amith.srinivas | last post by:
Hi all, From a word macro in VBA, I am trying to create a report in access DB. The report is based on a query with a parameter. I am using Set rpt = Application.CreateReport rpt.RecordSource =...
9
by: prakashwadhwani | last post by:
Hi !! I'm about to develop a new project for a client. Should I go about it in Access 2003 or 2007 ? Purchasing it either for me or for my client is not a major consideration here ... what I'd...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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
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...
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...

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.