Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Two tables...Getting info from one into the other 1

Status
Not open for further replies.

ejmiller2

Programmer
Jun 3, 2003
38
US
Ok...sorry this might be long...but ive tried everything difficult...and theres probably a simple solution.

I have two tables. The First (Employee) contains First Name, Last Name, Salary, Degree Type, and Years Experience. The second table (SalaryInfo) contains Years Experience, Salary, Degree Type.

I then have a Form that controls Employee Table so that i may add employees. This form contains two Text boxes. One for Years Experience and One for Degree Type.

Want i want to happen. When the user places a years experience and degree for a person i want the form to look into the salaryInfo see which salary it matches up with and then place this number into the Salary record in Employee table.....

How is this possible...ive tried many things...all so close, but seem to have some glitch..

eric
 
Why? First you have duplicate data in two tables. You should first Normalize your data. YERY BASIC ACCESS.
You should have two tables.
EmployeeInfo (Tablename) SalaryInfo (TableName)
EmployeeID (Primary Key) SalaryId (Primary Key)
Firstname Years Experience
Lastname DegreeType
SalaryID Salary

Create a Form using the Wizard for EmployeeInfo table.
Go to design view, delete the label and Textbox for SalaryId.
In it's place, create a combobox using the wizard that uses the SalaryInfo table as the source. Add all the tables fields to the combobox. Store answer in field SalaryId.

Now if you ever need the salary, years experience, Degree of an employee, you just do a simple two table query.

Neil
 
thanks...guess ive got a lot of extra work to do...

ill tell ya how it turns out

 
Thanks..while reconfiguring the tables...i figured out what was wrong. Thanks for the info.

eric
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top