Storing calculation results to the table

G

Guest

How do I get the calculated due dates from a form to save in the table? The
form currently calculates the due date based on the referral date; however,
this date does not transfer back to the table. This due date is a fixed date
that will never change once it is calculated. I understand that this violates
the basic rules of a database; however, I believe what I am trying to do is
the exception to these rules. Can anyone tell me how to accomplish this?
 
F

fredg

How do I get the calculated due dates from a form to save in the table? The
form currently calculates the due date based on the referral date; however,
this date does not transfer back to the table. This due date is a fixed date
that will never change once it is calculated. I understand that this violates
the basic rules of a database; however, I believe what I am trying to do is
the exception to these rules. Can anyone tell me how to accomplish this?

Why is it the 'everyone' who wants to do this thinks that their usage
is the exception to the rule?

You state that the due date will never be changed.
Will the date from which the due date is derived ever be changed?
If not, then do the calculation when you need the due date and there
is no need to save the calculation.
If it may be changed, then you certainly don't want to save a due date
that may be incorrect.
 
G

Guest

No, the referral date, which is the date the due date is derived from, does
not change. Is there a way to have the calculated due save to the table?
 
G

Guest

Because the referral date and the calculated due dates are fixed and will
never change.
 
G

Guest

That does not alter the reasons why you don't store calculated values.
It is taking up disk space, a calculation is faster than a disk fetch.

Also, keep in mind that when developing an application, nothing is set in
concrete, it is more like warm Jello. Sooner or later someone will say
"Well, this is great, but can we also make it ....."

Trust me, I have been doing this for close to 29 years (12/7/1976) and I
have yet to find a justification for storing a caculated value.
 
G

Guest

Then maybe you can tell me how to write a query for a range of dates (between
7/1/06 and 7/31/06) from a table that does not have the dates; however, the
dates are in the form. Does this make sense?
 
H

HiTechCoach via AccessMonster.com

what I am trying to do is the exception to these rules. Can anyone tell me how to accomplish this?


It is possible, but not sure if you really should.

To do it:
I would use the referral date's after update event to do the calculation .

Example:

Me.txtboxDueDate = DateAdd("d", 7, Me.txtboxReferraldate)

You will need to substitute your calculation for mine.

Note the the conrrol Me.txtboxDueDate is a text box that is bound the the Due
date field in the table.

--
Boyd
Hi Tech Coach
http://www.hitechcoach.com

Message posted via AccessMonster.com
 
G

Guest

Use the same calculation in the query that you do on the form to calculate
the date then apply the range criteria to that.
 
F

fredg

Then maybe you can tell me how to write a query for a range of dates (between
7/1/06 and 7/31/06) from a table that does not have the dates; however, the
dates are in the form. Does this make sense?

Then this should have been your question, not how to save a calculated
date!
Tell us how you calculate the due date from the referral date and I'm
sure one of us will give you the correct Where clause for a query. If
your more specific you'll get a more useful answer.
 
G

Guest

I appreciate all the responses to my question; however, what I don't
understand is why everyone has to be such a smarta** about the responses.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top