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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

auto date/time stamp

Status
Not open for further replies.

gambhir

Programmer
Oct 17, 2000
15
US
My development environment is VFP 5.0

Is it possible for VFP to automatically insert a date/time field into a record for every new record inserted into my table?


Cheers,

S
 
Hello.

Yes, it is possible, if your table is part of a database.
You can use a trigger. They are defined in table designer, and are executed automatically on append, update and delete.

Hope this helps.

Grigore Dolghin
 
gambhir, each table and view have field properties, where you can define default value expression for each field. It is regular VFP expression, where, for example, you can reference any global variable or VFP functions. In your case, just put into default value box for you date/time field in table/view designer 'DateTime()'. When every new record added, this field will be filled by that expression - by current time.

Vlad Grynchyshyn
vgryn@softserve.lviv.ua
The professional level of programmer could be determined by level of stupidity of his/her bugs
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top