Adding Employees to Sales that are completed

crxftw

Registered User.
Local time
Today, 06:58
Joined
Jun 9, 2011
Messages
81
Hello. I have database that stores data about sales that are done to the clients and sales will be made into invoices at the end of the month. For every sale there are certain employees doing work who get paid hourly. Previous solution for setting how many hours employee worked for that client that day was simply that employees were set up into teams and team was chosen who did work for client. After submitting sale, total hours done was split (divided by 2) and stored into table that held employee hours done. This system was not working very well as sometimes say total work was done 4 hours, but one employee did 1 hour and other one 3 hours of that and you had to change hours done manually because it was split after completing sale.

What I would like to do now is that when sale is already submitted, then you have an option to complete sale which should prompt up window where you can choose employees who did the work and enter hours done manually for every employee you chose. That way I could eliminate the team part. I would like to ask ideas how I can achieve that and get some tips maybe. Hours done for every employee is needed of course to print payslips at the end of the month for every employee.

Regards
 
Damn... sounds like a tough company you work for! :)

Entering the hours at the end of each sale would probably amount to a similar amount of work, but you could have a pop up form, in continuous view, that lists employees associated with a prticular sale, enter the hours, and job done. You'd have to create a table, say, "Hours Worked" with sale_ID, employee_ID and employee_time fields. At some point during the sale proces, you'd add employees to that sale ID. Then when it comes to completing the sale, use docmd.openform to open the form described above, using the filter part of the expression to pop up the correct sale ID. So, in the on click code of your "complete sale" button:
Code:
docmd.openform "Hours Worked",,,"[Sale_ID]="&me.sale_ID
 
Hehe, not working for the company, just helping to design a database to get current manual processes done in a little bit automated way.

Anyway, currently how my 'Complete Sale' submit is working, is that it runs named macro that looks up currently selected SaleID from Sales table (where all sales are stored) and EditRecord sets fields (StatusID, date and ticks IsCompleted checkbox). This named macro is set under Sales table. Is there a way that I can add Hours done records through the named macro or I have to set up different macro or vba code to store that data?

As I see it working, is that once you click 'Complete Sale' button, it opens form that selects that specific SaleID for that form. Now how I can get list of all available employees (total say 6, practically 4 can do max for one job) to that form, I see that multiple items form should do it? But how it's gonna store data for each employee that was selected and who I assigned hours worked to the 'HoursWorked' or in my db 'EmployeeHours' table each one individually?

Edit: Nevermind, I figured that out :) Thanks for taking time to answer!

Regards
 
Last edited:
No worries, this forum helps me loads too! Have a good one!
 

Users who are viewing this thread

Back
Top Bottom