Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quick Question (Calculating Expiration in Access)

Status
Not open for further replies.

kermitforney

Technical User
Mar 15, 2005
374
US
Just wondering if I can accomplish this in Access.
Basically, I want a text box in an Access form to input date information (specifically a Start date and an End date) for contracts into a table. Just wondering if when the End date expires can I program Access to then take the record off of the "Contracts" table and then place it on the "Expired Contracts Table"? If so please let me know and if there are a few different ways of doing this please let me know also. I am a noob to Access but I pick up software pretty easily. Thank you guys!! :eek:)
 
Why 2 tables ?
To get the list of expired contracts:
SELECT * FROM tblContracts WHERE [End Date]<=Date()
To get the list of alive contracts:
SELECT * FROM tblContracts WHERE Nz([End Date],#2099-12-31#)>Date()

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Where do I put that code?? In a report or query ?? I'm only familiar with Access on the surface. Nothing too deep like code or anything.
 
The posted code is SQL code (query source code).

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
So where in Access am I able to input SQL Code into my database ? In design view of a report?? I'm not totally lost just need to know where to plug in the information within Access.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top