Hi,
I have this piece of code below that was originally written with DAO object
model (using MS Access). Now I am converting the code to ADO to run off
MSSQL. The below piece of code causes an error. The error I believe occurs
in the SQL statement (criteria).
Error: "object variable or With Block variable not set"
I think it is something to do with the date format that is different from
Access to MSSQL. Any ideas anyone.
Thanks
Niall
dateinQ = DateAdd("d", interval, Date)
Do While ((Day(dateinQ) >= 1) And (Month(dateinQ) = Month(Date)))
'Do While (dateinQ >= DateAdd("d", 1, CDate(cmbWeek.Text)))
dailyTime = 0
criteria = "SELECT TTime.Time_In_Mins FROM TTime WHERE " _
& "TTime.date = #" & Format(dateinQ, "DD-MMM-YYYY") & "# " &
" AND TTime.persid = " & "'" & User & "'"
TimeDyn.Open criteria, hDb
Niall Hannon
Management Information Systems
___________________________________________
FINEOS
Pembroke House
8 - 10 Lower Pembroke St
Dublin 2
Ph: +xxx x xxxxxxx
Fax: +xxx x xxxxxxx
Why don't you visit our website at http://www.FINEOS.com
ENTERPRISE SOLUTIONS FOR BANKING AND INSURANCE
___________________________________________
**************************************************************************
The information contained in this e-mail is confidential,
may be privileged and is intended only for the use of the
recipient named above. If you are not the intended
recipient or a representative of the intended recipient,
you have received this e-mail in error and must not copy,
use or disclose the contents of this email to anybody
else. If you have received this e-mail in error, please
notify the sender immediately by return e-mail and
permanently delete the copy you received. This email has
been swept for computer viruses. However, you should
carry out your own virus checks.
Registered in Ireland, No. 205721. http://www.FINEOS.com
**************************************************************************