DATE

R

Ransom

Hello again!

I am using this code =DateSerial(Year([Opened Date]),Month([Opened
Date]),Day([Opened Date])+10)

on my form....is there a way for the date to get recorded in the main table
as well. because on the form and the report it shows up, but not in my main
table...do I need to run an update querie or something???

Any suggestions??

Thanks
Ransom
 
S

Steve Schapel

Ransom,

It would be simpler like this:
=[Opened Date]+10

Is Opened Date a field in the same record as where you want to record
this calculated date value in the table. So this date, whatever it is,
will always be 10 days after the Opened Date? If so, there is no
purpose served in storing it in the table. You will always be abe to
retrieve this value, whenever you need it, via a calculated field in a
query, or a calculated control (as you have done already) on your forms
and reports.
 
D

Douglas J. Steele

Since the date is calculated strictly based on another date in the same row,
you should not be storing it. Instead, create a query and add the
calculationg as a computed field. Use the query wherever you would otherwise
have used the table.

As fellow Access MVP John Vinson likes to say "Storing calculated data
generally accomplishes only three things: it wastes disk space, it wastes
time (a disk fetch is much slower than almost any reasonable calculation),
and it risks data validity, since once it's stored in a table either the
Total or one of the fields that goes into the total may be changed, making
the value WRONG."
 
R

Ransom

Wow..thanks! The answer to your question is yes. However what im doing is
having a command button merge certain fields into a word document. I need
that due date field with the actual date to get merged as well, however it
doesn't? Any suggestions

Steve Schapel said:
Ransom,

It would be simpler like this:
=[Opened Date]+10

Is Opened Date a field in the same record as where you want to record
this calculated date value in the table. So this date, whatever it is,
will always be 10 days after the Opened Date? If so, there is no
purpose served in storing it in the table. You will always be abe to
retrieve this value, whenever you need it, via a calculated field in a
query, or a calculated control (as you have done already) on your forms
and reports.

--
Steve Schapel, Microsoft Access MVP
Hello again!

I am using this code =DateSerial(Year([Opened Date]),Month([Opened
Date]),Day([Opened Date])+10)

on my form....is there a way for the date to get recorded in the main table
as well. because on the form and the report it shows up, but not in my main
table...do I need to run an update querie or something???
 
S

Steve Schapel

Ransom,

As per Doug's reply, use a calculated field in a query to return the Due
Date. And then use the query instead of the table as the data source
for your Word merge.
 

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

Similar Threads


Top