Disappearing Dates

R

RonnieF

I managed to get the Form to show [open date] +5, so that I have goal dates.
While the form shows the dates, the database does not. How do I get the
dates on to the database?
 
K

Ken Sheridan

If the goal date is always 5 days after the open date for each record you
don't need to, and moreover should not store the goal date in the table as
that would introduce redundancy and the risk of inconsistencies. Compute the
goal date on the fly in a query, report or (as you have done) a form.

Only if you need to edit the goal date so that it might be more or less than
5 days after the open date should you store it. In which case include a goal
date column in the table and bind a text box control to it in the form. Then
in the AfterUpdate event procedure of the open date control set the value of
the goal date with the following code:

Me.[Goal Date] = Me.[Open Date] + 5

Whenever you enter or change the value of open date that of goal date will
be set to 5 days later, but you can then edit it if necessary.

Ken Sheridan
Stafford, England
 
R

RonnieF

Thank you for the help, but I found a resource in my office that introduced
me to "update query". I have now used it successfully.

The big problem was that there were 5, 10, 30, 90, & 120 days ahead goals
that had to be calculated, and the gentlemen that were accessing the program
are not all computer savy. Now that the info is on the database, they can
look it up on a "stock report" and not need to know how the information got
there.

Thank you again

Ken Sheridan said:
If the goal date is always 5 days after the open date for each record you
don't need to, and moreover should not store the goal date in the table as
that would introduce redundancy and the risk of inconsistencies. Compute the
goal date on the fly in a query, report or (as you have done) a form.

Only if you need to edit the goal date so that it might be more or less than
5 days after the open date should you store it. In which case include a goal
date column in the table and bind a text box control to it in the form. Then
in the AfterUpdate event procedure of the open date control set the value of
the goal date with the following code:

Me.[Goal Date] = Me.[Open Date] + 5

Whenever you enter or change the value of open date that of goal date will
be set to 5 days later, but you can then edit it if necessary.

Ken Sheridan
Stafford, England

RonnieF said:
I managed to get the Form to show [open date] +5, so that I have goal dates.
While the form shows the dates, the database does not. How do I get the
dates on to the database?
 
Top