By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,851 Members | 1,001 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,851 IT Pros & Developers. It's quick & easy.

Udate Dates

P: 5
I'm using Ms access 2003 to diseign a contract system.I have a table where i keep my active contracts.In this table table i have a field called status and a field called expiry date.when a contracts is active it's status is active.What i want to do is when the contract expires i want the code to check curent date and if the expiry date is past the current date it should automatically chang the status to expired.
Jan 16 '08 #1
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 634
I'm using Ms access 2003 to diseign a contract system.I have a table where i keep my active contracts.In this table table i have a field called status and a field called expiry date.when a contracts is active it's status is active.What i want to do is when the contract expires i want the code to check curent date and if the expiry date is past the current date it should automatically chang the status to expired.
Hi

You need to run an update query like this (every day or when the DB is opened?)

UPDATE tblContracts SET tblContracts.Status = No
WHERE tblContracts.ExpiryDate<Date();

??

MTB
Jan 16 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.