Re: Updating Code from Access 2000 to 2003/2007
- From: John W. Vinson <jvinson@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 14 Nov 2007 13:21:13 -0700
On Wed, 14 Nov 2007 08:40:02 -0800, Scot McPherson <Scot
Is there a syntactical change I can make, to make these variable
declarations operate in Office 2003/7 ?
I'll assume that strTNO and dtOrigSusp are a string and date VBA variable
Try putting in delimiters:
DoCmd.RunSQL "Insert into [TempNewTSS] select * from tasklog where
Tasker_no='" & strTNO & "'"
For clarity, that's including a singlequote character ' before and after the
value of strTNO.
Date fields need # as a date delimiter: try
DoCmd.RunSQL "update [TempNewTSS] set OrigSuspense = #" & Format(dtOrigSusp,
"mm/dd/yyyy" & "#"
I'm a bit surprised this ever worked.
John W. Vinson [MVP]