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

Calculating future Dates in a form to be stored in a table.

P: 1
I am a beginer. I have been tasked at projecting failure dates of Batteries. Batteries have different failure rates. So when we install a battery "Change Date" and the known life is 3 yrs "Failure Time", I need that result to show up in a "Failed" date field. If a battery has a 10 year life, I need that to show up in the Failure Date field.
I cold see an expression in the "failed" field like =([ChangeDate]+[failureTime]) but it does not work. How stupid am I?
Jul 20 '12 #1
Share this Question
Share on Google+
1 Reply


Seth Schrock
Expert 2.5K+
P: 2,941
Are the failure rates always in years? If so, what I would do would be to have a Change_Date field and a Failure_Rate field in the table. You would then use a query to calculate the actual failure date. I do it this way because you aren't supposed to store calculated fields (read Database Normalization and Table Structures for the reason).

Your query would work like this:
Expand|Select|Wrap|Line Numbers
  1. SELECT Change_Date,
  2. Failure_Rate,
  3. DateAdd("YYYY",Failure_Rate,Change_Date) AS Failure_Time
  4. FROM table_name
  5.  
You can then base your forms or reports on this query.
Jul 20 '12 #2

Post your reply

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