PC Review


Reply
Thread Tools Rate Thread

Create a report that looks at three different fields for sorting.

 
 
BZeyger
Guest
Posts: n/a
 
      23rd Apr 2009
Hello,

I have created a detailed project report in Access VBA.
Basicly, I am intrested in sorting the info by the employee assigned.
The way the report is currently set up, I have a data field emploee1 as a
header.

However, I have 3 employee fields.

Employee1
Employee2
Employee3

Any employee can be assigned to any employee field. A job usually has no
more than three different employee working on it.

How can I sort the report by employee? The name can appear in any of the
three fields?
 
Reply With Quote
 
 
 
 
Fred
Guest
Posts: n/a
 
      23rd Apr 2009
No offense, but between using terms (without defining them) which have
meaning only to you, and mis-using some other Access terms, it was hard to
tell exactly what you are asking or what you have there.


Sorting is inherently hierarchal; you sort by the first attribute, and then,
at the next level down, within groups of people who have the first attribute
the same, you sort by a second attribute etc. And, in most data, attribute =
field. I'd use this paragraph to sort out exactly what you want to do.

So, in your report design,

So, decides which field is your top/first attribute, then your second. In
your report design view, hith the "sorting and grouping" incon, and enter
those in the box accordingly.


 
Reply With Quote
 
John Spencer MVP
Guest
Posts: n/a
 
      23rd Apr 2009
Best way would be to redesign your table structure. You should have a minimum
of three tables.
Projects
Employees
ProjectEmployees

The project employees table would have one record for each employee working on
a project.

If you are stuck with the current structure you will need to use a union query
as the source for your report. Without knowing the structure of your current
table (tables?), it is hard to give you a concrete example.

UNION queries cannot be built using the design view, but must be built in the
SQL view. HEre is a sample that returns one record for Project and each Employee.

SELECT Project, Employee1 as Employee
FROM YourTable
WHERE Employee1 is Not Null
UNION ALL
SELECT Project, Employee2 as Employee
FROM YourTable
WHERE Employee2 is Not Null
UNION ALL
SELECT Project, Employee3 as Employee
FROM YourTable
WHERE Employee3 is Not Null

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

BZeyger wrote:
> Hello,
>
> I have created a detailed project report in Access VBA.
> Basicly, I am intrested in sorting the info by the employee assigned.
> The way the report is currently set up, I have a data field emploee1 as a
> header.
>
> However, I have 3 employee fields.
>
> Employee1
> Employee2
> Employee3
>
> Any employee can be assigned to any employee field. A job usually has no
> more than three different employee working on it.
>
> How can I sort the report by employee? The name can appear in any of the
> three fields?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 Pivot table's Report filter fields value sorting =?Utf-8?B?QW1pZ28=?= Microsoft Excel New Users 2 20th Jan 2011 05:21 PM
Sorting Multilple fields in a report =?Utf-8?B?YW5q?= Microsoft Access Reports 1 18th Sep 2007 08:36 PM
2 part question - sorting by different fields for report =?Utf-8?B?U3RldmVQ?= Microsoft Access Reports 1 30th Aug 2007 04:24 PM
Sorting multiple fields as on in report PizzaBoy Microsoft Access 4 31st Oct 2004 08:20 PM
Sorting multiple fields as one in report PizzaBoy Microsoft Access Reports 0 28th Oct 2004 06:55 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:36 AM.