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 / Queries / September 2006

Tip: Looking for answers? Try searching our database.

Update query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Simon Glencross - 11 Sep 2006 21:41 GMT
I have the following update query

UPDATE tblcustomers INNER JOIN tblservice ON tblcustomers.ID =
tblservice.CustomerID SET tblservice.ServiceReminderSent = False
WHERE (((tblservice.ActDateCompleted) Is Null));

What I want to also be able to do is select only records with the current
date in the sentdate field.

Any suggestions please?
John Spencer - 12 Sep 2006 00:46 GMT
UPDATE tblcustomers INNER JOIN tblservice
ON tblcustomers.ID = tblservice.CustomerID
SET tblservice.ServiceReminderSent = False
WHERE (((tblservice.ActDateCompleted) Is Null)) AND SentDate = Date()

If I didn't qualify the table for SentDate since you didn't say which table it
is in.

If SentDate also contains the time, then modify this to
... And SentDate Between Date() and Date()+1

You could, in theory end up with a record that was sent at exactly midnight of
the following day, but in most cases that is an unlikely event.

> I have the following update query
>
[quoted text clipped - 6 lines]
>
> Any suggestions please?
 
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.