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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatic field fill in, based off another field, to be stored....

Status
Not open for further replies.

bddewell408

Technical User
Jul 25, 2003
56
US
not just viewed.

I have been trying to read the faqs and searched posts, but I could not find anything that matched my scenario, and user level correctly

QUICK BACKGROUND
Employee table
employee ID (primary key)
name
etc
Overtime table
otentryID(primary key)
employeeID (foreign key)
otrate (this is the field I need recorded)

Salary table
salaryid (auto# primary key)
employeeid (foreign key)
ysncurrentrecord
curSalary

THE PROBLEM

10 years from now I may want to look back at a historical trend and determine how much ot was paid during that year, but if I pull current salaries, I will not have exact figures. Also, I cannot do it by year because we have the possibility of getting several raises per year, what I want, without manual entry, is for the ot rate to be calculated =(curSalary/2080)*1.5, and put into the record after the employee's id is entered

I saw the FAQ about the combo box, which is how I enter employeeid, but I set the width of the ID to 0" so the person entering the data only goes by name. The problem is that if I set the control source to [employeeid].column.(6), it is not recorded in the actual [otrate] field.

Any help would be greatly appreciated. I do not know how to write code, but can copy and paste if told where it goes.

Thanks
Bryan
 
I was finally able to make this work using the AfterUpdate and then referencing the columns in the combo box, but I did it through code, and did not set the control source equal to the combobox.column(#)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top