Select/Append Query Malfunction

T

tbrogdon

I have an append query that takes a parameter and two combo box
selections from frmEmpSetHours. One of the combo box selections is
Shift (1, 2, or 3).

The resultant dynaset is appended to tblEmployeeProduction.

Shift 1 and 2 have Shift.ShiftHours of "8". Shift 3 has
Shift.ShiftHours of "7.5".

The problem is that the dynaset returned/appended after inputting
selections for 3rd shift return a Shift.ShiftHours value of 8 instead
of 7.5.

I have tried building the sql from scratch one line at a time and have
been successful returning the appropriate Shift.ShiftHours until I
build the INSERT INTO clause. I am not sure that this is where the
break down is but I do know that the query still returns the correct
values with the addition of cboShift to frmEmpSetHours.

Thank you for any suggestions!

My sql is:

PARAMETERS forms![frmSetEmpHours]![txtDate] DateTime;
INSERT INTO EmployeeProduction ( EmployeeID, ProductionDate,
Department, Shift, ShiftHours )
SELECT Employees.EmployeeID, forms!frmSetEmpHours!txtDate AS
ProductionDate, Employees.Department, Employees.Shift,
Shift.ShiftHours
FROM Shift INNER JOIN Employees ON Shift.Shift=Employees.Shift
WHERE (((Employees.Department)=forms!frmSetEmpHours!cboDept) And
((Employees.Shift)=forms!frmSetEmpHours!cboShift));


Tim
 
B

Baz

The field ShiftHours is defined *in the table* as an integer datatype i.e. a
data type that only supports whole numbers.

The integer datatypes are Byte, Integer and Long. You need to change the
table design so that the field is one of the datatypes which support
fractions, which are Single, Double, Decimal and Currency.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top