Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converted Access DB from 2003 to 2010 query not working 1

Status
Not open for further replies.

Dom606

IS-IT--Management
Jul 29, 2007
123
US
I just converted an Access 2003 database to 2010. All the queries work but one. the error is data mismatch in criteria expression.

below is the sql for the query and I have no idea what is wrong. Suggestions?

Code:
TRANSFORM Sum([Time Card Hours].BillableHours) AS SumOfBillableHours
SELECT [Time Card Hours].DateWorked, Sum([Time Card Hours].BillableHours) AS [Total Of BillableHours]
FROM Projects INNER JOIN [Time Card Hours] ON Projects.ProjectID = [Time Card Hours].ProjectID
WHERE (((DateAdd("d",7-Weekday([DateWorked]),[DateWorked]))="3/12/2011"))
GROUP BY [Time Card Hours].DateWorked, [Time Card Hours].TimeCardDetailID, DateAdd("d",7-Weekday([DateWorked]),[DateWorked])
ORDER BY [Time Card Hours].DateWorked
PIVOT Projects.ProjectName;
 
I'd replace this:
WHERE (((DateAdd("d",7-Weekday([DateWorked]),[DateWorked]))="3/12/2011"))
with this:
WHERE (((DateAdd("d",7-Weekday([DateWorked]),[DateWorked]))=[!]#2011-12-03#[/!]))

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top