G
Guest
Hey all,
I am working on some time tracking stuff for my database. I have the
employee hours entering part working fine. Now I want to be able have a
manager verify the time sheets. So far I have an unbound form with 3 controls
(Employee, start date, end date) which simply filter a subform based on a
query of the time tracking details.
I have a button which, when pressed, should update all the records displayed
such that the validation field is set to "true". I'm doing this with an
update query but so far I'm getting syntax errors.
Here is the current sql string that I'm using:
"UPDATE tbl_Time_Tracking_Details" & _
"Set tbl_Time_Tracking_Details.Validation = True Where Time_Track_ID" & _
"=(SELECT Time_Track_ID FROM tbl_Time_Tracking WHERE" & _
"EmpID = " & Employee & "AND date>" & start_date & _
"AND date<" & end_date & ")"
For the time tracking there are 2 tables. First one has an identifier
(Time_Track_ID), the employeeID and date. The second table is linked through
Time_Track_ID and has its own identifier (Time_Track_Details_ID) along with
some project and work related fields, the number of hours worked, and a
validation check box.
So as you can see I need to update the details table based on info in the
main table with the update query.
Any help is appreciated!
RY
I am working on some time tracking stuff for my database. I have the
employee hours entering part working fine. Now I want to be able have a
manager verify the time sheets. So far I have an unbound form with 3 controls
(Employee, start date, end date) which simply filter a subform based on a
query of the time tracking details.
I have a button which, when pressed, should update all the records displayed
such that the validation field is set to "true". I'm doing this with an
update query but so far I'm getting syntax errors.
Here is the current sql string that I'm using:
"UPDATE tbl_Time_Tracking_Details" & _
"Set tbl_Time_Tracking_Details.Validation = True Where Time_Track_ID" & _
"=(SELECT Time_Track_ID FROM tbl_Time_Tracking WHERE" & _
"EmpID = " & Employee & "AND date>" & start_date & _
"AND date<" & end_date & ")"
For the time tracking there are 2 tables. First one has an identifier
(Time_Track_ID), the employeeID and date. The second table is linked through
Time_Track_ID and has its own identifier (Time_Track_Details_ID) along with
some project and work related fields, the number of hours worked, and a
validation check box.
So as you can see I need to update the details table based on info in the
main table with the update query.
Any help is appreciated!
RY