This is a discussion on Re: Date Field With Access and SQL Server 2000 within the MS SQL ODBC forums, part of the Microsoft SQL Server category; --> I know this very late but I just saw this and hopefully this response will help someone. In a ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I know this very late but I just saw this and hopefully this response will help someone. In a SQL script, date fields must be prefixed and suffixed with a #. Try this instead: CurrentDb.Execute "UPDATE Items SET Items.LastOrderDate = #" & OrderDate & "# WHERE (Items.FormID)='" & FormID & "';" I use it all the time and it works fine. Also since you are using Access (2000 I assume), open the Visual Basic help by choosing help from a Module window. On the Index tab enter a Keyword search for: 'SQL date'. There are examples on how to make it work. Cheers -- Posted via http://dbforums.com |