Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Pete Sass
  Where is Pete Sass?
 Marathon, Ontario
 Pete Sass
 To: Leif Rickegard
  Where is Leif Rickegard?
 Leif Rickegard
Subject: RE: auto-update field when save in all form
Thread ID: 16056 Message ID: 16099 # Views: 2 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Wednesday, October 09, 2002 12:04:19 AM         

> I have four fields in all table named "created by", "create datetime", "last updated by" and "last update datetime".
> For the first two there is just to set default value to m.username and datetime(). But is there a way to autoupdate
> the other two fields every time the record where updated? I think mayby some code in the tables update trigger but
> i can't figur out how. Or is the answer a stored procedure?
> I use the form wizards and if i change the update buttom the automatic "I take care of it" is gone and i don't want that.
> Thanks for all help
> Leri


Personally I do not use the form wizard at all due to the restictions it places on me in
development.... this is something you can consider to start with.

That being said the last two fields would be updated on the cmdSave button on the form.
followed by a =tableupdate()

From my experience start shying away from the form wizard... and design your forms
manually. You will be surprised once you have sub-classed the baseform and using
this as a template how fast you can develop and have total flexibility and contol over
all your forms.

Pete from the Great White North ! (Only in Canada, ay...) Over and Out ...


auto-update field when save in all form Posted by Leif Rickegard @ 10/8/2002 10:29:15 AM
RE: auto-update field when save in all form Posted by Pete Sass @ 10/9/2002 12:04:19 AM