New to access, fairly easy question

P

P. Rossiter

Hey everybody,

I just got a problem dropped in my lap. I have a database that just
contains employees and employee ID numbers. On a form that creates a job
requisition an employee ID has to be entered to denote who will be doing the
job.

Here is my problem:

I have to create a report that will be generated monthly and will show all
the jobs and who completed them. When I build the report, it only displays
the Employee ID number, (which what was entered in the form) but I want
Access to retrieve the corresponding employee name that goes with the number
and display that information on the report. I have all the employees' names
and ID numbers on one data table, how do get Access to put the names in,
instead of the ID numbers?

Thanks for any help!
 
R

Rick B

In the query that you are using as the data source for your report, you need
to include the table with the details you are pulling *and* you need to also
include the Employee table where the ID and Name exists. When you do this,
it should automatically draw a line between the two tables that connects the
like fields in each (Employee ID).

In your query grid, include the employee name from the Employee Table.

Then, in your report, the Employee name will become a valid selection that
you can add to your report.

If well-designed, you will actually have a FirstName and a LastName field in
your table, not a combined name field. Assuming that is the case, you will
want to include both names.

Post back if you need more details.
 
S

SusanV

Assuming you have an Employee table which holds both the ID and the name,
and it is related to the job table, create a query choosing the employee
name rather than the id, then base the report on that.
 
P

P. Rossiter

Thanks a lot for your help Rick, you are on the right track. When I create
my report with the relationships that I have entered for the data, the report
only spews out one name. Since I only have one table with the employee names
and ID information.

You see my report looks something like:

ID NUMBER1 ID NUMBER2

LAST NAME LAST NAME

Where in the ID number fields the number that was entered in the form shows
up, and the last name that is related to that employee number from the data
table shows up.

So, for example it shows:

1 2

SMITH SMITH


I need somehow to get the report to kick out the two different names. I
tried creating another table with the exact same employee information in it,
with the label LAST NAME 2, and then I set up the new relationships. I set
up the report and I get an error.

This is the error that Access gives me:

Type mismatch in JOIN expression. (Error 3615)
A JOIN expression is attempting to join two tables on fields of incompatible
data types. For example, you will get this error if you attempt to join a
Memo field with a Text field.

If you can help me with this last hurdle I would greatly appreciate it.

Thanks a lot!

P. Rossiter
 

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

Similar Threads


Top