I have a field in a SQL Server table defined as smalldatetime. In my access
database I link to that table and have the following code, but am gettting a
type mismatch.
DoCmd.RunSQL "UPDATE dbo_Anesth SET fldExported = Now() " & _
"WHERE ((dbo_Anesth.fldExported) Is Null) and [ip_opdate] Between #" &
dtStart & "# And #" & dtEnd & "# "
What am I missing?
"Sash" <Sash@discussions.microsoft.com> wrote in message
<ABD8DCA5-C7D0-4C02-8914-C08AEACE886F@microsoft.com>:
> I have a field in a SQL Server table defined as smalldatetime. In my
> access database I link to that table and have the following code,
[quoted text clipped - 5 lines]
>
> What am I missing?
One possible guess - date format
... Between #" & format$(dtStart, "yyyy-mm-dd") & "# And #" & _
format$(dtEnd, "yyyy-mm-dd") & "# "
here using ISO 8601

Signature
Roy-Vidar