You don't say where you want to do the calculation (days elapsed). If you want it on the main form you can add an unbound textbox and set its control source to something like this:
=Date-Max2(Me.[LastUpdated],Max2(Me.Subform1.[LastUpdated],Me.Subform2.[LastUpdated]))
This should give you the number of days since the last update.
Add the two public functions below to a standard module:
Code:
Public Function Min2(a As Variant, b As Variant) As Variant
'
' Returns the lesser of 2 values
'
Min2 = IIf(a < b, a, b)
End Function
Public Function Max2(a As Variant, b As Variant) As Variant
'
' Returns the greater of 2 values
'
Max2 = IIf(a > b, a, b)
End Function
Paul, the example you gave does it for the same table, I think we are looking at three different ones.
Cheers,
Vlad