By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,991 Members | 1,888 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,991 IT Pros & Developers. It's quick & easy.

Help with Data entry

P: 3
I have two tables, tblEmployees and tblEmployeepayment. tblEmployees has the following fields the data to this table comes from our payroll system

EmployeeID
Name
Paygroup
Employeestatus
Annualsalary

tlbEmployeepayment has the following fields which will be entered by the user.

EmployeeID
PayPerioddt
Paybegdate
Payenddate
Partialpayment
Hours
Annualsalary

I have created query from these two tables. I have one to many releationship between tblEmployees and tblEmployeepayment based on EmployeeID. I need annualsalary in my tblemployeepayment tble because I want to keep track of their salary based on payperiod. For exmple if on 5/15/2007 their salary 50000 and on 5/31/07 their salary 55000 I want keep their salary history for each pay period. The question is that when the users start data entery I want to auto populate the salaryfield for them to reduce data entery errors. Can someone help please.
May 7 '07 #1
Share this Question
Share on Google+
5 Replies


JConsulting
Expert 100+
P: 603
I have two tables, tblEmployees and tblEmployeepayment. tblEmployees has the following fields the data to this table comes from our payroll system

EmployeeID
Name
Paygroup
Employeestatus
Annualsalary

tlbEmployeepayment has the following fields which will be entered by the user.

EmployeeID
PayPerioddt
Paybegdate
Payenddate
Partialpayment
Hours
Annualsalary

I have created query from these two tables. I have one to many releationship between tblEmployees and tblEmployeepayment based on EmployeeID. I need annualsalary in my tblemployeepayment tble because I want to keep track of their salary based on payperiod. For exmple if on 5/15/2007 their salary 50000 and on 5/31/07 their salary 55000 I want keep their salary history for each pay period. The question is that when the users start data entery I want to auto populate the salaryfield for them to reduce data entery errors. Can someone help please.

my first thought is that you need to add an Index to your tblEmployeepayment table
UniqueID
EmployeeID
PayPerioddt
Paybegdate
Payenddate
Partialpayment
Hours
Annualsalary

How are you set up for data entry? A primary form with a subform?
J
May 7 '07 #2

P: 3
my first thought is that you need to add an Index to your tblEmployeepayment table
UniqueID
EmployeeID
PayPerioddt
Paybegdate
Payenddate
Partialpayment
Hours
Annualsalary

How are you set up for data entry? A primary form with a subform?
J

Yes. I have a primary form witha subform. I do have a uniqueId in tbleployeepayment table forgot to mention it.
May 7 '07 #3

JConsulting
Expert 100+
P: 603
Yes. I have a primary form witha subform. I do have a uniqueId in tbleployeepayment table forgot to mention it.
>>The question is that when the users start data entery I want to auto populate the salaryfield for them to reduce data entery errors. Can someone help please.

When you're beginning your data entry...

They open a record to a specific Employee?
Are they entering Hours?

How about on the form's On_Current event you do a look up based on the employee id and assign it as the Salary

me.salary = nz(dlookup("Salary","EmployeeTable","EmployeeID = " & me.EmployeeID))

something like that.
J
May 8 '07 #4

P: 3
>>The question is that when the users start data entery I want to auto populate the salaryfield for them to reduce data entery errors. Can someone help please.

When you're beginning your data entry...

They open a record to a specific Employee?
Are they entering Hours?

How about on the form's On_Current event you do a look up based on the employee id and assign it as the Salary

me.salary = nz(dlookup("Salary","EmployeeTable","EmployeeID = " & me.EmployeeID))

something like that.
J
I dont' want to do a calculated field, because I want to store the salary for each pay period. When the user opens the form they enter pay period, begin date and end date and hours. I would like to keep the history for each of the pay period
May 8 '07 #5

JConsulting
Expert 100+
P: 603
I dont' want to do a calculated field, because I want to store the salary for each pay period. When the user opens the form they enter pay period, begin date and end date and hours. I would like to keep the history for each of the pay period
Maybe you / I misunderstood...The small lookup code wouln't be in the control source of your Salary textbox...it would be in a VBA module to automatically populate it.

Isn't that what you asked for?
May 8 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.