I have a form (frmTime) in an Employee Time database that displays all the days of a particular month (the records) and a few fields (Columns) for them to track where they spent their time that day.
Upon opening frmTime, the following runs:
strSQL = "SELECT tblTimeLog.TimeID, tblEmployees.EmployeeID, tblEmployees.FirstName, tblEmployees.LastName, tblTimeLog.DateDay, tblTimeLog.[310Hours], tblTimeLog.[310Minutes], tblTimeLog.[320Hours], tblTimeLog.[320Minutes]
FROM (tblTimeLog INNER JOIN tblEmployees ON tblTimeLog.EmployeeID=tblEmployees.EmployeeID) INNER JOIN tblDates ON tblTimeLog.DateDay=tblDates.DateDay
WHERE ((tblEmployees.EmployeeID)=1) And (12=Month(tblTimeLog.DateDay)) And (2012=Year(tblTimeLog.DateDay))"
Forms!frmTime.RecordSource = strSQL
The form opens the correct records, however, I can't enter/update the values in the form - 310Hours, 310Minutes, etc...
On the Property Sheet for the form, Allow Additions, Allows Edits are both set to Yes. What else should I be looking for? When I use the above code directly in a query, I can't update that query either.
Anna Jaeger
iMIS Database Support
Upon opening frmTime, the following runs:
strSQL = "SELECT tblTimeLog.TimeID, tblEmployees.EmployeeID, tblEmployees.FirstName, tblEmployees.LastName, tblTimeLog.DateDay, tblTimeLog.[310Hours], tblTimeLog.[310Minutes], tblTimeLog.[320Hours], tblTimeLog.[320Minutes]
FROM (tblTimeLog INNER JOIN tblEmployees ON tblTimeLog.EmployeeID=tblEmployees.EmployeeID) INNER JOIN tblDates ON tblTimeLog.DateDay=tblDates.DateDay
WHERE ((tblEmployees.EmployeeID)=1) And (12=Month(tblTimeLog.DateDay)) And (2012=Year(tblTimeLog.DateDay))"
Forms!frmTime.RecordSource = strSQL
The form opens the correct records, however, I can't enter/update the values in the form - 310Hours, 310Minutes, etc...
On the Property Sheet for the form, Allow Additions, Allows Edits are both set to Yes. What else should I be looking for? When I use the above code directly in a query, I can't update that query either.
Anna Jaeger
iMIS Database Support