Calculated field

  • Thread starter Thread starter jim
  • Start date Start date
J

jim

I am trying to calculated the number of days between to manually entered
dates.Example.... Start date=02/05/08 and due date=02/08/08.... 3 days right?
how do i get it to show on my form and entered into my table?
 
Jim,

It is bad practice to store calculated fields in your tables. If you need to
store is somewhere you typically use a query for this. You'd then use yhis
query as the source for your form.

Calculation in the query: create a new field called difference like this

difference: datediff("d",[firstdatefield],[seconddatefield])

hth
 
Maurice,

Thanks for the help. I am however still fighting the form/query. When I type
in the line you gave me it asks me for an input. Please help.

Maurice said:
Jim,

It is bad practice to store calculated fields in your tables. If you need to
store is somewhere you typically use a query for this. You'd then use yhis
query as the source for your form.

Calculation in the query: create a new field called difference like this

difference: datediff("d",[firstdatefield],[seconddatefield])

hth
--
Maurice Ausum


jim said:
I am trying to calculated the number of days between to manually entered
dates.Example.... Start date=02/05/08 and due date=02/08/08.... 3 days right?
how do i get it to show on my form and entered into my table?
 
Jim,

You did replace the fields with the names of your own datefields right? The
two fieldnames I provided as references replace them with your own
fieldnames...
--
Maurice Ausum


jim said:
Maurice,

Thanks for the help. I am however still fighting the form/query. When I type
in the line you gave me it asks me for an input. Please help.

Maurice said:
Jim,

It is bad practice to store calculated fields in your tables. If you need to
store is somewhere you typically use a query for this. You'd then use yhis
query as the source for your form.

Calculation in the query: create a new field called difference like this

difference: datediff("d",[firstdatefield],[seconddatefield])

hth
--
Maurice Ausum


jim said:
I am trying to calculated the number of days between to manually entered
dates.Example.... Start date=02/05/08 and due date=02/08/08.... 3 days right?
how do i get it to show on my form and entered into my table?
 

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

Back
Top