auto update field

mobaligh

Registered User.
Local time
Today, 04:33
Joined
Apr 30, 2007
Messages
17
Can someone plz help. I am very new to VB

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.
 
im no expert but you shouldn't have EmplName or EmplSalary in the LOA table and you shouldn't have the same field as the primary key multiple tables.

unless im an idiot, remove the two fields and add a new primary. i dont know what LOA stands for or what it is but may be you could use LOAID. then just have EmplID as a foreign key.

with that working...

put a sub form on your LOA form. base the form on the Employee table.
now when you update the emplid the sub form should go to the record of that employee.
 

Users who are viewing this thread

Back
Top Bottom