I've messed up big time.

R

RTimberlake

I have a query that I use to enter data for timesheets on. The query has
worked great up until I started messing with it. Somehow the feild for
TimeSheetID which is set to Autonumber, will not fill in the query. This has
never been a problem before. Please help before I get fired.
 
R

RTimberlake

Here is the SQL statement for my query:


SELECT tblTimeSheet.TimeSheetID, tblEmployees.[Employee ID],
tblTimeSheet.PayPeriod, tblTimeSheet.DateWorked, tblTimeSheet.TimeIn,
tblTimeSheet.TimeOut, (([TimeOut]-[TimeIn])*1440)/60 AS HoursWorked,
tblTimeSheet.Vacation, tblTimeSheet.Personal
FROM tblEmployees INNER JOIN tblTimeSheet ON tblEmployees.[Employee ID] =
tblTimeSheet.EmployeeID
WHERE (((tblEmployees.[Employee ID])=[Forms]![PASSWORDS].[cmbEmployeeID])
AND ((tblTimeSheet.PayPeriod)=22) AND ((tblEmployees.[Employee
Password])=[Forms]![PASSWORDS].[cmbPassword]));

Thank you for your help.
 
L

Larry Linson

Just how did you "mess with" the Query?

I see nothing particular here that would prevent _only_ the TimeSheetID
Field from being displayed, if indeed, that is the exact name of the Field
and if that is what you meant by your question.

But it appears to me that you have unbalanced parentheses in the WHERE
clause.

I'd suggest you restore the Query to its original form, and see if you can't
accomplish what you want using the Query Builder instead of "messing with"
the SQL itself.

Larry Linson
Microsoft Access MVP






RTimberlake said:
Here is the SQL statement for my query:


SELECT tblTimeSheet.TimeSheetID, tblEmployees.[Employee ID],
tblTimeSheet.PayPeriod, tblTimeSheet.DateWorked, tblTimeSheet.TimeIn,
tblTimeSheet.TimeOut, (([TimeOut]-[TimeIn])*1440)/60 AS HoursWorked,
tblTimeSheet.Vacation, tblTimeSheet.Personal
FROM tblEmployees INNER JOIN tblTimeSheet ON tblEmployees.[Employee ID] =
tblTimeSheet.EmployeeID
WHERE (((tblEmployees.[Employee ID])=[Forms]![PASSWORDS].[cmbEmployeeID])
AND ((tblTimeSheet.PayPeriod)=22) AND ((tblEmployees.[Employee
Password])=[Forms]![PASSWORDS].[cmbPassword]));

Thank you for your help.


Jeff C said:
Without you posting the query it will be difficult to assist
 
Top