Report - Query multiple columns

L

Loggical

I would like to have the information printed from my query on a report.

I have query with multiple fields that hold employees id numbers. Each one of
these employees was involved in the same specific occurrence on that day.
ID1 00789 EmployeeName1 Ted
ID2 12456 EmployeeName2 Tom
ID3 34121 EmployeeName3 Harry
ID4 12678 EmployeeName4 Steve
ID5 76341 EmployeeName5 Mike

I have created a Parameter Query that queries all five columns which brings
up the correct results in the Query. How do I get the correct EmployeeName
and ID to show up in the Header of the Report?
Using the above example.
The problem is when I use the Parameter Query in the Report {Enter Employee
Number} when I enter 12678 it will only show the top EmployeeName and ID
00789 Ted in my Report Header. I need it to be able to show Steve 12678.

The Report should show all the occurrences associated with an employee with
their Name and ID number in the Report Header. The Report does everything
else correctly but the Name and ID number.
 
D

Duane Hookom

How about show us your SQL view of the "Parameter Query that queries all
five columns"? It sounds like you have 5 fields for storing employee ID
numbers. This might be consider a poor table structure.
 
L

Loggical

Duane said:
How about show us your SQL view of the "Parameter Query that queries all
five columns"? It sounds like you have 5 fields for storing employee ID
numbers. This might be consider a poor table structure.
I would like to have the information printed from my query on a report.
[quoted text clipped - 21 lines]
their Name and ID number in the Report Header. The Report does everything
else correctly but the Name and ID number.

The only reason I have placed multiple fields as in ID1, EmployeeName1, ID2,
EmployeeName2 ........ I need to be able associate a specific occurrence to
multiple employees which occurred on a specific time, date, place.............
........ etc. I have DLOOKUP fields that fill in the rest of the information
in my tblOccurrence after the ID is entered. Meaning if I enter the ID then
automatically the EmployeeName, EmployeePosition, EmployeeDepartment is all
entered.

And because Im learning as I go. This is an old DB I am re-doing from scratch
so If I need to do changes then no problem. I am far from being any Access
Guru.

Maybe I have communicated the wrong Query used. Select Query is being used.
In each column of the Select Query under ID1, ID2, ID3, ID4, ID5 in the
criteria I have put [Enter Employees Number] and the report is associated to
the Select Query which when activated asks you to [Enter Employees Number]

I only found this site the other day and have already managed to use a few of
the suggestions. In todays world it is great to find people helping other
people without expecting to be paid.

Very much appreciated for your help.
 
D

Duane Hookom

I think you should use a related table where your "multiple fields" become
multiple records. It also sounds like you are storing the name and the ID
fields in your table. In a typical database, an employee's name is stored in
only one table in one record. You can use queries to display the employee
name based on the stored employee ID.

--
Duane Hookom
MS Access MVP

Loggical said:
Duane said:
How about show us your SQL view of the "Parameter Query that queries all
five columns"? It sounds like you have 5 fields for storing employee ID
numbers. This might be consider a poor table structure.
I would like to have the information printed from my query on a report.
[quoted text clipped - 21 lines]
their Name and ID number in the Report Header. The Report does
everything
else correctly but the Name and ID number.

The only reason I have placed multiple fields as in ID1, EmployeeName1,
ID2,
EmployeeName2 ........ I need to be able associate a specific occurrence
to
multiple employees which occurred on a specific time, date,
place.............
....... etc. I have DLOOKUP fields that fill in the rest of the
information
in my tblOccurrence after the ID is entered. Meaning if I enter the ID
then
automatically the EmployeeName, EmployeePosition, EmployeeDepartment is
all
entered.

And because Im learning as I go. This is an old DB I am re-doing from
scratch
so If I need to do changes then no problem. I am far from being any Access
Guru.

Maybe I have communicated the wrong Query used. Select Query is being
used.
In each column of the Select Query under ID1, ID2, ID3, ID4, ID5 in the
criteria I have put [Enter Employees Number] and the report is associated
to
the Select Query which when activated asks you to [Enter Employees Number]

I only found this site the other day and have already managed to use a few
of
the suggestions. In todays world it is great to find people helping other
people without expecting to be paid.

Very much appreciated for your help.
 

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