Hi People
i am trying to run this sql
strSQL = "select sum(BillableHours) as totalHours from TimeSheetHours, TimeSheet where TimeSheetHours.TimecardID = TimeSheet.TimecardID and TimeSheet.EmployeeID = " & empID & " and TimeSheet.MonthYear = '" & formonth & "'"
But its giving me an error saying datatype mismatch and i am 100% sure that error is bacause of the last condition "TimeSheet.MonthYear = '" & formonth & "'"
If i remove this condition my sql works fine
Now issue is that TimeSheet.MonthYear is a datetime field and the formonth variable is a string. I think thats the reason why its saying datatype mismatch
Can any one help me in getting this fixed
Thanks in advance
Rizzzzzzzz
i am trying to run this sql
strSQL = "select sum(BillableHours) as totalHours from TimeSheetHours, TimeSheet where TimeSheetHours.TimecardID = TimeSheet.TimecardID and TimeSheet.EmployeeID = " & empID & " and TimeSheet.MonthYear = '" & formonth & "'"
But its giving me an error saying datatype mismatch and i am 100% sure that error is bacause of the last condition "TimeSheet.MonthYear = '" & formonth & "'"
If i remove this condition my sql works fine
Now issue is that TimeSheet.MonthYear is a datetime field and the formonth variable is a string. I think thats the reason why its saying datatype mismatch
Can any one help me in getting this fixed
Thanks in advance
Rizzzzzzzz