Apr 4 2008, 08:23 AM
I need to be able to inter a wage and have it be constant when I open the wage & Hr. form and be able to change it when I need to?
Apr 4 2008, 08:44 AM
?? OK, so create a table to store the current wage:
this method will allow you to store differant wage rates...without knowing more, this is about the best I can tell you...
Apr 4 2008, 09:02 AM
When I open the data base and enter Hrs in text box I want it to calculate the total wage for that employee with out haveing to enter there wage "daller amount" each time I enter Hrs
Apr 4 2008, 09:30 AM
Do all employees have the same hourly wage?? If yes, will they always all have the same hourly wage, as in will each employee always have the same hourly wage as the other employees?
If the hourly wage varies among employees, then just include a field for Wage in your Employee table.
How is your form set up, do you just enter hours per day or for the week/pay period once? Are you keeping track of the hours worked, or just using the form to calculate the pay and then the hours are not saved for that time period worked? The reason I ask that is it will effect your table design/structure. Do you have a table storing employee hours?
Apr 4 2008, 10:15 AM
The way I have it set now is.
txttotalWage = txthrs * $12.00
But if he gets a raise I want to enter it in a text box and not have to change the wage in the code or have to use a drop box. Just enter the Hrs for that day and the per Hr wage will be automaticly in the calculation. When I click totals cmdbotton daily I won't have to enter the wage each time.
Ps Will you be off or from?
Apr 4 2008, 02:03 PM
Very nice approach dumas..From (and from where do you travel?)
OK, one more question about the db then...will you need to see how much the employee made at any point before the raise, basically, do you want historical data??
Apr 4 2008, 09:37 PM
I just want to enter the hrs. and the wage will stored in the form so I won't have to enter wage each time I enter Hrs.
FOr save it on the form or have it auto load as a constant but be able to change it when I need to and have that wage automaticly there when I need it.
Thanks for your help
Apr 7 2008, 09:19 AM
Just to clarify a little bit, nothing is "stored" in a form, only in tables. Since each employee could have a different wage, you will need to include a field in the employee table to store the wage.
I'm still a little confused on the hours part though. Are you figuring hours daily, paying daily? Can you post your table structure. From our discussion so far you should have something like:
Without storing the hours worked, which is what it sounds like you are doing, on your form you would have an unbound textbox control to enter hours (txtHoursWoked) and an unbound textbox control txtPay) to calculate their pay for those hours. The contorl source for txtPay would be = [txtHoursWoked]*[HourlyWage]
Then, on the OnCurrent event you need to have code to set txtHoursWorked back to 0. The problem with this setup is once you go to the next record, you can't come back and view the hours of the employee you just did. This is why it might be necessary to have a field for HoursWorked as well in tblEmployees and after you run your pay for the day or week, you reset that field to 0 for each employee. Then instead of a textbox to enter hours, you have the control from tblEmployees and your calcualted control becomes: =[HoursWorked]*[HourlyWage]
Hope that helps!!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here