If by any chance the SQL is running against a SQL Server db, the syntax for a literal date is different. Use single quotes surrounding the date literal instead of #, and enter the date as 'yyyy.mm.dd'.
"Allen Browne" <AllenBrowne[ at ]SeeSig.Invalid> wrote in message news:eKHfHl2SJHA.3584[ at ]TK2MSFTNGP06.phx.gbl...
[Quoted Text] > Is the target field a date/time field? > > Make sure you use the US format (regarldless of your regional settings), > e.g. #11/22/2008#. > > Post the problem SQL statement if you are still stuck. > > Also, tell us how you are executing this, e.g. by running the query, > RunSQL in a macro, or Execute in code. > > -- > Allen Browne - Microsoft MVP. Perth, Western Australia > Tips for Access users - http://allenbrowne.com/tips.html> Reply to group, rather than allenbrowne at mvps dot org. > > "James Brown" <jamesbrowncoaching[ at ]gmail.com> wrote in message > news:%23o62yY1SJHA.5364[ at ]TK2MSFTNGP05.phx.gbl... >> Help! >> >> I have an sql INSERT INTO statement that won't work when I include a date >> field. Can anyone advise? >> >> I've removed the date field/value and it works fine. >> I've enclosed the Date in # characters. >> I have a message box which shows the statement before running it and that >> looks fine too.
|