calculated fields

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

I have a calculated field in a form for some timelines we have here. I
would like to find an easy way to get access to record this number in a
field, so I could have the database calculate the date for users and them not
have to copy and paste that date into another field.

Please keep in mind that I am barely learning SQL. I know a little but not
a lot and I didn't build the database using code, so I get confused when
people talk about coding because I am not sure where to put it really.

Thanks for any help!
steph...
 
Typically, you would not store a calculated value. That violates normalized
relational database rules.

Just add whatever DATEADD function you need to the calculation and you will
have the date you need.

Unless you give us specifics, we can't provide you with a specific solution.


For more details on why you should not store a calculated value, do a search
and read the previous posts.
 
thanks, i was pretty sure this was something that i should not be doing,
which is why i haven't done this in the database before now. however, there
is someone here who kept asking about it and i just wanted to make sure that
there wasn't some way to do this that i had overlooked that wouldn't cause
problems....but i forgot to search first.

thanks again and take care, steph...
 
Hi all,

I have a calculated field in a form for some timelines we have here. I
would like to find an easy way to get access to record this number in a
field, so I could have the database calculate the date for users and them not
have to copy and paste that date into another field.

Rather than doing the calculation on a Form, do it in a Query.

Just type

NewFieldname: DateAdd... <whatever your expression is>

This field can then be used on a Form, a Report, as a criterion in a
query, for sorting, or pretty much anything you want to do with it
(except of course that it cannot be updated).

As noted, DON'T store it in any Table field.

John W. Vinson[MVP]
 
Back
Top