I have two tables:
WorkedHrs(directly below) and calcalendar (where the data are actually entered initially)
SELECT ID,
EmployeeName,
Address,
DateField,
TimeField,
EndTime,
DATEDIFF("n", [TimeField], [EndTime])/60 AS TotalHrs,
OwnerID,
EmployeeRate,
*[EmployeeRate][TotalHrs] AS Earnings
FROM WorkedHours
This is what is supposed to happen:
As soon as data are entered in the calcalendar table the following are inserted into "workedhrs table"
no problems here as I used brilliant code supplied by the asprunner in the events as follows:
'**** Insert a record into another table ****
dim dal_table
set dal_table=dal.Table("WorkedHours")
dal_table.DateField=values("DateField")
dal_table.EmployeeName=values("EmployeeName")
dal_table.Address=values("Theme")
dal_table.TimeField=values("TimeField")
dal_table.EndTime=values("EndTime")
dal_table.OwnerID=values("OwnerID")
dal_table.EmployeeRate=values("EmployeeRate")
dal_table.Add()
the resulting table correctly displays:
StarTime, end time, correctly calculate numbers of hours worked, displays the EmployeeRate BUT
it does not calculate the Earnings
what am I doing incorrectly?