Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

last update field

Status
Not open for further replies.

bigandfat

Technical User
Feb 7, 2002
42
CA
I am trying to automate a field to record the last time a record was updated. I have a form with 5 data fields, followed by a lastupdate field. I would like the last update field to record the date of the last change of any of the 5 data fields.
If anyone has the time to point me in the right direction, I would be greatfull.
Thanks in advance
 
In the change value event of data field
D=Today()
#editField=D ; of last update field
postRecord()
seems to work for me
just in case someone else was interested in recording the date of the last entry
Thanks
Dennis
 
B&F

You might also consider making the field type timeStamp instead and using a DateTime data type. You could also create another field to store the userID.

[tt]
var
n String
dt dateTime
tc TCursor
endVar


dt = dateTime()
n = getNetUserName()
tc.open("junque.db")
tc.edit()
tc.end() ; not necessary
tc.insertAfterRecord() ; not necessary
tc.DateTime = dt
tc.UserName = n
tc.endEdit()
tc.close()
[/tt]

This will give you information for each record like;

12:00:00 AM, 6/6/03 ... which give you a time and date

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top