Can't figure out how to get records needed

T

Tony Girgenti

I have a table with several fields in it. The three main fields are Name,
Sidemark and Jobno.

The data in the table can have duplicates for all three fields. Except that
Name and Sidemark only appear once for each group of records with the same
Jobno. In all the other records in one jobno group I have blanks in name
and sidemark.

Records with non-blank names always have a non-blank sidemark and vice
versa. I want to be able to run a report that will print name(from the non
blank field), sidemark(from the non blank field) and jobno. I only want the
name to print when the name changes for a group of jobno's and only want the
sidemark to print when the sidemark changes for a group of jobno's. I want
to print all jobno's together.

I have the report designed and a form asking for the name to be
printed/viwed and they can print/view all name if desired. It doesn't give
the results i want because i don't know how to ask for the records needed
and how to group and sort them.

Any help with this problem would be greatly appreciated.

Thanks,
Tony
 
B

Bruce

I have been working on just this sort of thing, with lots
of help from this newsgroup. Maybe I can offer some
direction based on my recent experience. First, though, I
wonder about your database structure. Are names
associated with more than one job number? If so, you
would probably do well to keep the information in separate
tables. Same with sidemark (I don't know what that is, by
the way).
Having said that, you need a parameter query to select a
name. Base a query on the table or tables, and in the
design grid place [Name] on the criteria line for the
[Name] field. Base your report on that query, and when
you open the report you will be prompted for input for
that field. There are many considerations (for instance,
what if two people have the same name), and many
variations of this basic process (using a combo box to
select names, being able to view all records, etc.). The
words Criteria and Parameter will provide some direction
in Help and in newsgroups, and might even provide enough
detail to solve a particular issue.
For grouping records by name, again refer to Help for
basic information. In general, go to View > Sorting and
Grouping. In the Field/Expression column, select your
[Name] field, and click Yes next to Group Header. In the
report, place the [Name] field in the group header.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top