date multiplication

deejay_totoro

Registered User.
Local time
Today, 22:19
Joined
May 29, 2003
Messages
169
Dear All,

I have two date fields and a "number of months" field. For example:

Date1: 01/01/2004
Months: 6
Date2: 01/07/2004 (date1 x 6 months)

What I would like to do is have a calculated text box that will show the user what date2 should be.

Many thanks!

dj_T
 
into a field automatically?

Thank you for your reply.

I used the following:

=DateAdd("m",[fdlMonth],[fldDate1]) which adds the number of months in fldMonth onto the date in fldDate1.

What I was wondering how might I automatically put this resulting value directly into a field on the form?

Thank you again.

dj_T
 
You've answered your own question, just use the expression as the control source for an unbound textbox
 
best practice

Rich said:
You've answered your own question, just use the expression as the control source for an unbound textbox

Thanks again,

But what I would like to do is have this value placed in a normal field (text box) so that the user doesnt have to key it in. I would like the date to be automatically stored...

Or!

Should I not store this value this way? Instead calculate the new date "on the fly" on reports and queries?

Which is best practice?

Thank you again.

dj_T
 
The normalization rulez say you shouldnt store fixed calculated values...

There are obvious exceptions, say if the calculation takes an unacceptable amount of time or if the calculation must be supersedable by manual input.

Most any other calculation: Dont store it!
Also if you are going to use this all over the place create a function to do it. If you should ever need to change it, you need only change the function.

Regards
 
ok!

ah!

ok! I'll do the calculations in queries and reports.

Thanks for the help everyone.

dj_T
 

Users who are viewing this thread

Back
Top Bottom