procedure SetDate
*
lparameter tcField
if vartype(tcField) <> "C" or empty(tcField)
tcField = "LastUpdate"
endif
tcField = upper(alltrim(tcField))
local llFound, i
for i = 1 to fcount()
if upper(field(i)) == tcField
llFound = .t.
exit
endif
endfor
if llFound
replace (tcField) with Date()
endif
return .t.
For the table, put SetDate('LastUpdate') in the Record Validation Rule of the table. Substitute your data field name for LastDate. Now everytime a field is modified in that table the LastUpdate field of the table will be set to the current date.Mark McCasland
Midlothian, TX USA