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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A system which can update itself when the date ( dd/mm/yy)changes

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
A system which can update itself when the date ( dd/mm/yy)changes: I have been set a task at school to make a system whereby if a record has a date which is more than 5 years ago, from today, it appears in the report. This is simple to do, you just goto the find assistant and find any records which are equal to or less than a date 5 years from now. But the date changes daily (obviously) therefore how can i make a system which updates automatically to today's date, it must update daily! Please help. Thanks
 
This is easy to do with Approach.

1)Go into Field Definition and define a calculated field named StartDate with this formula: Today() - ((365 * 5) + 1) which covers most periods with only one leapyear included.

2) Then define another calculated field named OldRecords with this formula: If(recordfielddate <= StartDate,'Yes','No') Substitute your field date name for &quot;recordfielddate&quot; in the formula.

3) Go to a worksheet view of your database and add the OldRecords field to it. You will see it has been filled in with &quot;Yes&quot; and &quot;No&quot; values for you.

4) Do a Find on the worksheet and enter Yes into OldRecords. Click Ok and the found set will be those old records for your report.

5) Type a name for this Find you just ran into the field box on the Action Bar where &quot;Current Find/Sort&quot; is shown, or go to Create - Named Find/Sort from the menu bar and EDIT the &quot;current find/sort&quot; so you can give it a name.

6) Save your approach file. You can now use this newly created Find and it will automatically adjust the date for you!

This type of Find and others are explained on our support site for Lotus products at - register there to see the FAQs, Fixes, Tips, etc folder where all our goodies are kept, or try our Free Downloads area!

Sue Sloan
[sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top