DateDiff

G

Guest

I am a novice user, so please be gentle with your responses.

I have created a form for data entry into a table. One of the table fields
is the amount of days that a claim has been open for. I have inserted a
DateDiff function in the default value field in the properties of the field
on the form, however the form does not display the results from the DateDiff
function nor does it update the table. The function is
DateDiff("d",[Claim_create_Date],Now())

Could someone please help me.

Andrew
 
J

John Vinson

I am a novice user, so please be gentle with your responses.

I have created a form for data entry into a table. One of the table fields
is the amount of days that a claim has been open for.

I would hazard a guess that this field SHOULD NOT EXIST in your table.

if a claim has been open six days today, it will have been open for
seven days tomorrow. That is... any value that you have in this field
*will certainly be wrong* tomorrow, and even wronger the next day.
I have inserted a
DateDiff function in the default value field in the properties of the field
on the form, however the form does not display the results from the DateDiff
function nor does it update the table. The function is
DateDiff("d",[Claim_create_Date],Now())

Simply use a Textbox with this expression as its Control Source on any
Form or Report where you want to display this information. There is no
need or benefit to storing it in any Table - just calculate it on the
fly as it's needed.

John W. Vinson[MVP]
 

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

Top