Auto update fields from one table based on a field in another table

mobaligh

Registered User.
Local time
Today, 01:05
Joined
Apr 30, 2007
Messages
17
I have created a data entrey form where user would enter the employee id and I would like to automatically update empoyee name, salary on this table from the employees table. I have spent so much time and can't go any far. I am very new to VB.

thanks
 
Unless you have some historical reason, having the Employee ID in the table is all that is required. A query joining the two tables on the ID will make all of the fields in the other table available for viewing or editing
 
May this would help

I have two tables in my database Employee table and LOA Table. On the employee table I have the following fields.

Emplid
EmplName
EmplSalary

On the LOA table I have

Emplid
EmplName
EmplStatus
Period_bg_dt
Period_end_dt
EmplSalary
Number_days

I have created a bound form for the LOA Table where the user would put information about the emloyee. Once the user adds the emplid I would like to auto populate the EmplName and EmplSalary for that Employee. I have created a releationship based on the emplid in for these tables.
 
As I said, unless you have some historical reason, you do *not* need the EmplName or EmplSalary in the LOA table. A query with both of the tables in it will allow you to treat the Name and Salary as if they are in the LOA table. One of the many powers of queries. In an RDBMS data other than keys should *only* exist in one table.
 

Users who are viewing this thread

Back
Top Bottom