Lookup value in a table

J

Jodie Beecraft

Is there any way that you can create a column in the table that references
the column before and finds the answer based on this?

I am currently creating a work report database, the columns in the table are;
Date
Job # (Currently a Drop Down Lookup Field referenced from the below table)
Job Description
Employee Name

There is also a job number table that contains the Job # and Job Description
that matches it.

What I want is to enter information into the work report table, when I
select the job number from the appropriate list I want the Job Description
Column automatically filled. Can I do this?
 
M

mscertified

Yes, you can but you don't want to have the job description duplicated in two
different tables. I am presuming the job description is a fixed value for
each job #.
If an employee can work on more than one job, your table structure needs
even more work.

-Dorian
 
J

John Vinson

On Wed, 4 Jan 2006 14:39:12 -0800, "Jodie Beecraft" <Jodie
Is there any way that you can create a column in the table that references
the column before and finds the answer based on this?

I am currently creating a work report database, the columns in the table are;
Date
Job # (Currently a Drop Down Lookup Field referenced from the below table)
Job Description
Employee Name

There is also a job number table that contains the Job # and Job Description
that matches it.

What I want is to enter information into the work report table, when I
select the job number from the appropriate list I want the Job Description
Column automatically filled. Can I do this?

With some difficulty - but it is neither necessary to do so, nor is it
good design.

You're using a relational database; use it relationally! Each piece of
information (Job Description say) should be stored ONCE, and once
only, in the Job Number table.

If you want to see the job description in conjunction with a name, use
a Query linking the two tables together. If you're assuming that you
must have all the data in one table in order to generate a report,
that's your error.

Similarly, the work report table should NOT contain the employee name,
only the employee's unique ID. The name (preferably as FirstName,
LastName, MiddleName and Suffix fields) should be stored in the
employee table, and only in that table.

John W. Vinson[MVP]
 

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