lookup field on report

D

Deb

Hi...this is hard to explain, but I have a question, and
will need real specific instructions on how to solve it,
since I am new. I dont know how to explain it, so let me
tell you what I have.
STUDENT TABLE: Has a field called CSStaff, and it is a
lookup field based on a table called CSSTAFF which has
firstname and last name as fields.

When creating the report, I put the CSstaff field on the
report, but it only shows the last name on the report.
How do i get it also to display the first name? I cannot
create a query to show both first and last names as a
trim becuase I have a first and last name field in my
student table also. I am sure there must be a property
place somewhere where I tell it to display both columns
of the lookup in a report, but I just have no idea where
that would be. HOpe this makes sense.....

--Deb
 
E

Ed Robichaud

Select the [CSStaff] field in your report and select View-Properties. On
either the data or all tabs, select the columns row and change it to "2".
BTW, your CSStaff table should have a primary key like StaffID (autonumber)
and that (not the name which will be eventually duplicated) should be the
linked/related to a similar field (CSStaff -number/long integer) in your
Student table.

-Ed
 
J

John Vinson

Hi...this is hard to explain, but I have a question, and
will need real specific instructions on how to solve it,
since I am new. I dont know how to explain it, so let me
tell you what I have.
STUDENT TABLE: Has a field called CSStaff, and it is a
lookup field based on a table called CSSTAFF which has
firstname and last name as fields.

Your table DOES NOT HAVE firstname or lastname in it.

The Lookup Wizard is (as it often does) deceiving you. It's concealing
the actual contents of your table!

See http://www.mvps.org/access/lookupfields.htm for a critique of this
(IMHO) misdesigned and misleading feature.
When creating the report, I put the CSstaff field on the
report, but it only shows the last name on the report.
How do i get it also to display the first name? I cannot
create a query to show both first and last names as a
trim becuase I have a first and last name field in my
student table also.

Sure you can. Just use the syntax [CSstaff].[FirstName], or in the
Query Design window use

StaffFirst: [CSstaff].[FirstName]

to create an alias name.
I am sure there must be a property
place somewhere where I tell it to display both columns
of the lookup in a report, but I just have no idea where
that would be. HOpe this makes sense.....

THere isn't. The Lookup feature works in table datasheets, but is
*very* limited and all but useless once you get beyond that stage.
 

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