FIlters and Grouping

R

Rob

Hi all,

Is it possible to group records when using filters on a table. Personnel
are orgainsed at work by position numbers. Sub departments are annoted with
a letter eg 001A, 001D.

I can filter using expressions - Like "*D" to group all D's together. What
we would like to be able to do is to display all records by department. eg
all a's, d's etc. We do it for reports but would like to be able to do it
for tables,

Thanking you,
Rob
 
A

Allen Browne

Rob, any chance of making the departmental suffix into a separate field?

One of the basic rules of data normalization is to make the fields atomic,
i.e. store only one thing in any field. You can still print the 2 fields as
one on a report, but you can much more easily and efficiently filter the
data if it is stored in separate fields.
 
V

Van T. Dinh

You can create a Query with a Calculated Field that only has the Department
Code and then sort the Rows by this calculated Field.

OTOH, you are storing 2 items of data (PositionNo and DepartmentCode) in one
Field value. This violates the First Normal Form of Database Normalisation
which requires each Field value to be atomic, meaning containing only one
item of data.

If you are not too far into the database development cycle, it may be better
to normalise your database now before proceeding further.
 
R

Rob

Hi all,

Unfortunatley I cannot normalise the database as I am working with an
existing product developed by somebody else (this is not the only example of
poor normalisation in this db).

Thanks for all your responses!

Cheers
 
Top