Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / November 2006

Tip: Looking for answers? Try searching our database.

Date w/ Access & SQL Server

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sash - 06 Nov 2006 18:13 GMT
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?
RoyVidar - 06 Nov 2006 22:04 GMT
"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

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.