Microsoft Access Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft Access Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old February 20th, 2004, 09:13 AM
castorsmith castorsmith is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 8 castorsmith User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
updating cumulative savings depending on end date !Really help!

Basicaly I have a table which holds the list of projects the company has done. And I store 'projectenddate' 'Savings' and 'cumulative savings' all txt fields. The 'Cumulative savings' is to be calculated on the same day every year that that the project ended. This cumulative field should add the amount in the Savings field once a year. The problem is that all projects end on different dates through out the year. so I need to know how i could scan the table field 'projectenddate' on a daily basis and if the day and month is the same as project end date, then update the cumulative field once only every year (what if the database is opened twice in same day , don't update twice!!!)

For example:

Year 1
projectenddate=01/01/2004
Savings=£20,000
Cumulative savings=£20,000

Year 2 (it is now 1 year to the day)
Savings=£20,000
Cumulative Savings=£40,000

etc (keep adding the amount of savings to the cumulative every year)

Has anyone any ideas on the code that could keep the 'cumulative savings' text field uptodate and where do i put it

Cheers castor

Reply With Quote
  #2  
Old February 20th, 2004, 11:02 AM
TBÁrpi's Avatar
TBÁrpi TBÁrpi is offline
Lazy User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Hungary, Europe
Posts: 337 TBÁrpi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 h 5 m 5 sec
Reputation Power: 6
Send a message via MSN to TBÁrpi Send a message via Yahoo to TBÁrpi Send a message via Skype to TBÁrpi
Generally, I would log the calculations in a table and check at startup if the calculation is done for a certain year (current year, for example). If no, then I would call a sub that opens the table via DAO and runs a cycle within it that looks through the table and vould calculate the cummulative values.
__________________
BRegs,
TBÁrpi
"I can only show you the door. You're the one who has to walk through it."

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft Access Help > updating cumulative savings depending on end date !Really help!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT