Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report Grouping Problem

Status
Not open for further replies.

BSC5905

Technical User
Apr 30, 2004
20
US
I have created a data base that consists of two tables. The first table is “Table of Employees” which consists of the employee’s personal information. The second table is “Table of Department” which consists of the employee’s company/department information. I created a query based on the Department Table (See below). I than created a report based on that query. When I create the report with “Report Wizard” the data in the report comes out perfectly. However when create the report with grouping with the Report Wizard, the ManagerSupervisor data displays the EmployeeID from my Table of Employee’s and not the Manager/Supervisor name. When I view the data of the query in datasheet view, the correct data is displayed not the EmplyeeID. Is there something that I am doing wrong in my query or tables to make Manager/Supervisor data display the EmployeeID in the report?


Employees Table -tblEmployes
EmployeeID – This is my primary key
FirstName
LastName
DateOfBirth
HomeAddress
City
State
Zipcode
HomePhone


Department Table - tblDept
Dept_ID - This a an autonunber an my primary key
EmployeeName – Lookup value from, “tblEmployees” - EmployeeID
JobTitle
ManagerSupervisor - Lookup value from, “tblEmployees” - EmployeeID
CubeOfficeNumber
WorkNumber
CellularNumber
ProjectNumber
HireDate


Manager Query – All fields are from the Department Table
ManagerSupervisor
EmployeeName
JobTitle
HireDate
 
Don't ever use lookup fields in table designs. If you want to display text values, make sure the fields containing the text values are included in the record source.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Hi--why do you have a separate table for DEPT? Does an employee have more than one HIRE DATE? Or more than one DEPT? Or more than one OFFICE NUMBER? If not, I suggest putting that info into the Employees table.

Then perhaps you could have a Departments table, which has just the Dept Number, Dept Name and Mgr ID (taken from the Employees table, and assuming that a dept only has one manager).

In any case, you may want to take a second look at your table structure.

Ginger

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244. Basics at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top