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

Modified By Field

Status
Not open for further replies.

lespaul

Programmer
Feb 4, 2002
7,083
US
I am adding a field to my main table named 'MODIFIED_BY'. I have captured the user's name from the database login prompt. That was the EASY part! Now I need to be able to tell if any information has been changed and if so, then update the table to change the modified by field.

I have one form (frmJurorInfo) with several tabs. If a user modifies information on any of these pages, I want to record their name in the MODIFIED_BY field.

Does anyone have any ideas on the best way to determine if something has changed? I was thinking about having a boolean (booModified) set to FALSE when the form opens and then in the OnChange event, set the boolean to true. Then when the form closes if booModified is true then run the update query.

Sound reasonable? Does the OnChange event fire any other time (like when the data is loaded into the form)? Is there a better way to capture changes?

Thanks for any info!

Leslie
 
I have also done it that way. The onchange or onclick for a radiobutton does fire if you load your data in a form. So just make sure that you set your boolean after you have loaded you data.
 
Thanks Karen! I'll give it a try and see how it works out!

leslie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top