DateDiff in Table itself?

usachrisk

Registered User.
Local time
Today, 03:18
Joined
Jun 12, 2002
Messages
16
Hello,

I know how to use the DateDiff function in a form so that I could find out the differences between two dates, but is this at all possible directly in the table? I.E. for simplicity sake, let's say I have four fields in one example table:

ID (autonumber)
Start Date (Date/Time)
End Date (Date/Time) and
Difference (Int(?))

Could I have the Difference Field automatically calculate the difference between the first two fields in its own record?

Thanks,
Christopher.
 
Since the value is calculated you shouldn't store the diff at all, either calculate it at form or report level.
 
As far as I know, you can not do this in a table in Access 2.0 or Access97.

The "Default Value" property of a table field can not contain an expression that refers to other fields in the table.

You could create an Append query to populate a table and do the calculation in the query.

RichM
 

Users who are viewing this thread

Back
Top Bottom