Autofill in table

G

Guest

Hi,

I have a master table that I am trying to update with fields from a
reference table that I've set up

Master Table

Record Job Title Job Code
1 C ?
2 B ?
3 E ?
4 A ?

Note: Job Title is currently a combobox that has a drop down menu

Reference Table
Job Title Job Code
A AB101
B AB304
C CD506
D CD1
E CD39

I would like to be able to have Job Code automatically appear based on the
reference table once I select the right Job Title from the drop-down menu on
the master table.

Is there a query I can use to lookup the job code information from the
reference table to the master table?

Thanks!
 
D

David Lloyd

SELECT [Job Code] FROM Master INNER JOIN Reference ON Master.[Job Title] =
Reference.[Job Title] Where [Job Title]=Forms!MyForm!cmbJobTitle

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


Hi,

I have a master table that I am trying to update with fields from a
reference table that I've set up

Master Table

Record Job Title Job Code
1 C ?
2 B ?
3 E ?
4 A ?

Note: Job Title is currently a combobox that has a drop down menu

Reference Table
Job Title Job Code
A AB101
B AB304
C CD506
D CD1
E CD39

I would like to be able to have Job Code automatically appear based on the
reference table once I select the right Job Title from the drop-down menu on
the master table.

Is there a query I can use to lookup the job code information from the
reference table to the master table?

Thanks!
 
V

Van T. Dinh

If [Job Title] uniquely determines the [Job Code] then you shouldn't even
store the [Job Code] in the master Table.

When you need to use the [Job Code] with data in the master Table, simply
use a Query to combine the data from the Master Table and the Refeence
Table.

HTH
Van T. Dinh
MVP (Access)
 

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