T
tbrogdon
I need to select a set of records from a table, add the same date (any
date) to each returned record and then append that to yet another
table.
I have tblEmployeeProduction which has EmployeeID, ProdDate,
Department, Shift, and TotalHoursWorked.
I have qryEmpShiftHours that queries tblEmployees.EmployeeID,
tblEmployees.Department, tblEmployees.Shift, tblDepartment.Department,
tblShift.Shift and tblShift.ShiftHours (different shifts have
different hours).
I have frmEmpShiftHours which has txtProdDate (unbound), cboDept,
cboShift, and cmdRunQuery which returns qryEmpSetHours filtered on
cboDept and cboShift.
qryEmpShiftHours returns just fine the SQL is:
SELECT Employees.EmployeeID, Employees.Department, Employees.Shift,
Shift.ShiftHours
FROM Shift INNER JOIN (Department INNER JOIN Employees ON
Department.Department=Employees.Department) ON
Shift.Shift=Employees.Shift
WHERE (((Employees.Department)=forms!frmSetEmpHours!cboDept) And
((Employees.Shift)=forms!frmSetEmpHours!cboShift));
I have 2 questions:
1) How can I append this recordset to tblEmployeeProduction directly
without actually opening the recordset in datasheet view? and
2) How can I add the date from frmEmpShiftHours.txtProdDate to each
record in the recordset during the appending process or is there
another way that I am unfamliar with?
TIA,
Tim
date) to each returned record and then append that to yet another
table.
I have tblEmployeeProduction which has EmployeeID, ProdDate,
Department, Shift, and TotalHoursWorked.
I have qryEmpShiftHours that queries tblEmployees.EmployeeID,
tblEmployees.Department, tblEmployees.Shift, tblDepartment.Department,
tblShift.Shift and tblShift.ShiftHours (different shifts have
different hours).
I have frmEmpShiftHours which has txtProdDate (unbound), cboDept,
cboShift, and cmdRunQuery which returns qryEmpSetHours filtered on
cboDept and cboShift.
qryEmpShiftHours returns just fine the SQL is:
SELECT Employees.EmployeeID, Employees.Department, Employees.Shift,
Shift.ShiftHours
FROM Shift INNER JOIN (Department INNER JOIN Employees ON
Department.Department=Employees.Department) ON
Shift.Shift=Employees.Shift
WHERE (((Employees.Department)=forms!frmSetEmpHours!cboDept) And
((Employees.Shift)=forms!frmSetEmpHours!cboShift));
I have 2 questions:
1) How can I append this recordset to tblEmployeeProduction directly
without actually opening the recordset in datasheet view? and
2) How can I add the date from frmEmpShiftHours.txtProdDate to each
record in the recordset during the appending process or is there
another way that I am unfamliar with?
TIA,
Tim