Thanks for reading my post.
I need to generate daily time sheets for 3 groups (departments) of employees. I’ve created a form, frmTimeSheets the record source is qryTimeSheets that selects all active employees by department using cboDepartment on the form. There is also a calendar control on the form to select a date to be displayed on the time sheet. The output is to a report, rptTimeSheet which generates one time sheet for each employee. So the basic information that’s printed (barcode) on each sheet is EmployeeNumber, DepartmentID and LaborDate. All of this works well but I need to also print on each sheet a unique TagNumber to prevent duplicate entery when the completed time sheet are returned for posting into tblLaborHrs. (I can’t use a composite key of EmployeeNumber and Date because employees can have more than one time sheet per day.)
From reading other similar posts I understand that the only sure way to generate unique numbers is to create them in a table and then use them to generate these numbers. So I’ve created a tblTagNumbers with only two fields, TagNumberID (auto number) and TagNumber.
On a daily basis, each department prints time sheets for their employees to be included with the employee’s route sheet for the next day. How do I go about: 1, obtain a set of the tag numbers for each batch of time sheets and 2, insure that those same numbers are not used on another batch of time sheets?
Any help would be much appreciated!
I need to generate daily time sheets for 3 groups (departments) of employees. I’ve created a form, frmTimeSheets the record source is qryTimeSheets that selects all active employees by department using cboDepartment on the form. There is also a calendar control on the form to select a date to be displayed on the time sheet. The output is to a report, rptTimeSheet which generates one time sheet for each employee. So the basic information that’s printed (barcode) on each sheet is EmployeeNumber, DepartmentID and LaborDate. All of this works well but I need to also print on each sheet a unique TagNumber to prevent duplicate entery when the completed time sheet are returned for posting into tblLaborHrs. (I can’t use a composite key of EmployeeNumber and Date because employees can have more than one time sheet per day.)
From reading other similar posts I understand that the only sure way to generate unique numbers is to create them in a table and then use them to generate these numbers. So I’ve created a tblTagNumbers with only two fields, TagNumberID (auto number) and TagNumber.
On a daily basis, each department prints time sheets for their employees to be included with the employee’s route sheet for the next day. How do I go about: 1, obtain a set of the tag numbers for each batch of time sheets and 2, insure that those same numbers are not used on another batch of time sheets?
Any help would be much appreciated!