Date/Time Field Question

  • Thread starter Thread starter depawl
  • Start date Start date
D

depawl

How would one go about designing a table that automatically enters a
date based on a different date that the user enters?
Example: the table has a list of new hirees and the date they were
hired. Once the user enters this "date hired", the table needs to
automatically calculate a date for a performance review (or whatever)
which would be say, 90 days after the hire date.
I've been able to do this using an update query, but then I can't design
a form based on it (the update query), and I've been able to design a
form to calculate the "performance review date", but it doesn't update
the database.
Thanks.
 
How would one go about designing a table that automatically enters a
date based on a different date that the user enters?
Example: the table has a list of new hirees and the date they were
hired. Once the user enters this "date hired", the table needs to
automatically calculate a date for a performance review (or whatever)
which would be say, 90 days after the hire date.
I've been able to do this using an update query, but then I can't design
a form based on it (the update query), and I've been able to design a
form to calculate the "performance review date", but it doesn't update
the database.
Thanks.
You really ought not store calculated values. Instead of the perf.
review date keep the date when the review was last performed. And put
code in the form's OnCurrent event show a flag when that date has
arrived or passed or even upcoming.

- Jim
 
Your best bet is to base your form on a query that includes the appropriate
calculation, such as Review Due:[DateField]+90
There is no reason to store the calculation in the table.
 
Thanks for the input folks, but I do have a reason to store the
calculated date in the table. I'm designing an access program to update
an old dBase program, which includes the calculated date in the
database. I'm going to import all the records from the old program so I
need the new table to be consistent with the old database.
Thank you.


Con said:
Your best bet is to base your form on a query that includes the appropriate
calculation, such as Review Due:[DateField]+90
There is no reason to store the calculation in the table.




How would one go about designing a table that automatically enters a
date based on a different date that the user enters?
Example: the table has a list of new hirees and the date they were
hired. Once the user enters this "date hired", the table needs to
automatically calculate a date for a performance review (or whatever)
which would be say, 90 days after the hire date.
I've been able to do this using an update query, but then I can't design
a form based on it (the update query), and I've been able to design a
form to calculate the "performance review date", but it doesn't update
the database.
Thanks.
 
You know, I would disagree with the concept. I would reverse the logic
and manipulate the dbase data to fit your new schema.

It reminds me of when I was converting a DataFlex - one of the xBase
clones - application to Access. I designed the new application to
*deal* with the information that was existent in the DataFlex. I ended
up creating an intermediate application that would convert the the DF
data into what I needed for the new app. This was done so that the
conversion would happen seamlessly. Folks left work Friday using DF
and returned on Monday and were using the Access app. (Of course there
was training prior to this.)

The actual conversion took less then an hour. The point being; don't
degrade your new RDBMS to fit the old xBase way of doing things.

That my $0.02.

- Jim

This is a multi-part message in MIME format.
--------------020500080003070803090003
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Thanks for the input folks, but I do have a reason to store the
calculated date in the table. I'm designing an access program to update
an old dBase program, which includes the calculated date in the
database. I'm going to import all the records from the old program so I
need the new table to be consistent with the old database.
Thank you.


Con said:
Your best bet is to base your form on a query that includes the appropriate
calculation, such as Review Due:[DateField]+90
There is no reason to store the calculation in the table.




How would one go about designing a table that automatically enters a
date based on a different date that the user enters?
Example: the table has a list of new hirees and the date they were
hired. Once the user enters this "date hired", the table needs to
automatically calculate a date for a performance review (or whatever)
which would be say, 90 days after the hire date.
I've been able to do this using an update query, but then I can't design
a form based on it (the update query), and I've been able to design a
form to calculate the "performance review date", but it doesn't update
the database.
Thanks.

--------------020500080003070803090003
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Thanks for the input folks, but I do have a reason to store the
calculated date in the table. I'm designing an access program to update
an old dBase program, which includes the calculated date in the
database. I'm going to import all the records from the old program so I
need the new table to be consistent with the old database.<br>
Thank you.<br>
<br>
<br>
Con Giacomini wrote:<br>
<blockquote type="cite" cite="midPJxZb.231487$U%255.1471557@attbi_s03">
<pre wrap="">Your best bet is to base your form on a query that includes the appropriate
calculation, such as Review Due:[DateField]+90
There is no reason to store the calculation in the table.



<a class="moz-txt-link-freetext" href="</pre>
<blockquote type="cite">
<pre wrap="">How would one go about designing a table that automatically enters a
date based on a different date that the user enters?
Example: the table has a list of new hirees and the date they were
hired. Once the user enters this "date hired", the table needs to
automatically calculate a date for a performance review (or whatever)
which would be say, 90 days after the hire date.
I've been able to do this using an update query, but then I can't design
a form based on it (the update query), and I've been able to design a
form to calculate the "performance review date", but it doesn't update
the database.
Thanks.

</pre>
</blockquote>
<pre wrap=""><!---->

</pre>
</blockquote>
</body>
</html>

--------------020500080003070803090003--
 
Back
Top