473,396 Members | 2,068 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.

MS Access 2003 Query/Report Problem

Hi, I have a problem which should have a relatively simple solution, I just cannot find it.

I have a select query which gives me the following results:

Expand|Select|Wrap|Line Numbers
  1. Company_Name    Staff_FirstName    Staff_Surname    Staff_DOB
  2.      ABC Ltd                 Joanne               Robinson       08/12/1950
  3.      DEF Ltd                  Kevin                  Smith           25/04/1963
  4.      ABC Ltd                  Paul                   Jones           08/06/1947
  5.      DEF Ltd                  Lisa                    White           12/09/1965
  6.          ....                       ....                       ....                   ....  
  7.          etc                      etc                       etc                   etc
  8.  
Apologies for the layout of the above query, it doesn't look like this when I am editing my post :-)

The field 'Company_Name' comes from the table 'tblCompany' and the fields 'Staff_FirstName', Staff_Surname' and Staff_DOB' come from the table 'tblStaff'.

I want to get a report for each company showing the company name and then underneath the details for each staff member for that particular company.

In the report footer I want to show number of companies and number of staff members overall.

How am I able to do this? I am using the count function on the report to count staff numbers, but I cannot get it to count the unique company name because of the data redundancy. Please remember that the 'CompanyID' field is hidden on the query, but this has no bearing on the data duplication.

I have thought about creating a query based on the above query and just select the 'CompanyID' and 'Company_Name' fields and then use the SELECT DISTINCT function and use the 'Count' feature on my report. This, however, would involve me having to have multiple Record Sources for my main report. I have also thought about creating a subreport on my main report and putting the RecordSource for the subreport as the new query and then somehow linking the two reports.

Thanks for any help it is much appreciated.
Gareth.
Oct 23 '07 #1
1 2020
Rabbit
12,516 Expert Mod 8TB
The font used is not equal width for every character, surround blocks of text if you want to use a font that will allow you to line things up. As long as you get the spacing correct that is.

As for your problem. Use the DCount function.
Oct 23 '07 #2

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

Similar topics

14
by: Sean C. | last post by:
Helpful folks, Most of my previous experience with DB2 was on s390 mainframe systems and the optimizer on this platform always seemed very predictable and consistent. Since moving to a WinNT/UDB...
5
by: Ken Lindner | last post by:
We have a report based on a query that is called from a form. Nothing too special here. The query has 3 coulmns that are populated directly from values entered into entry fields on the form...
14
by: JK Peck | last post by:
I have a fairly large Access application that ran correctly in Access 2000. After upgrading to Access 2003 (and recompiling and updating references), it reliably crashes at a certain point. If I...
0
by: Frederick Noronha \(FN\) | last post by:
---------- Forwarded message ---------- Solutions to Everyday User Interface and Programming Problems O'Reilly Releases "Access Cookbook, Second Edition" Sebastopol, CA--Neither reference book...
7
by: manning_news | last post by:
I've got a report that's not sorting correctly. I build a SQL statement and assign it to the recordsource in the Open event, sorting the data the way the user chooses. The user can choose up to 3...
52
by: Neil | last post by:
We are running an Access 2000 MDB with a SQL 7 back end. Our network guy is upgrading to Windows Server 2003 and wants to upgrade Office and SQL Server at the same time. We're moving to SQL Server...
1
by: Jeemo | last post by:
I've been tearing my hair out on this one. This effin' database keeps crashing on me while I'm doing query-related operations. System info: Access 2003 SP2 with all the latest updates on an XP...
2
by: Andy | last post by:
Hi guys I having a problem creating a report in Access 2003 project talking to a SQL database through and ODBC connect. After hours of trying things from Access Help, MSDN and Google I still...
1
by: jjjoic | last post by:
Hi, I use Access 2003 to generate the back-end data for a ColdFusion report at work. The report is sorted by a column and based on the sorting, rankings are assigned to each row(i.e. the biggest...
8
by: DanicaDear | last post by:
I have something interesting...looking to see if anyone else has came across this. I have a query with parameter and and the query works beautifully every time. However, when I use the wizard...
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: 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?
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
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...
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...
0
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,...

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.