p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Access (http://p2p.wrox.com/forumdisplay.php?f=18)
-   -   controls, any updated? (http://p2p.wrox.com/showthread.php?t=23107)

skinny December 27th, 2004 06:31 AM

controls, any updated?
Hi all,
Hope the festivities have left you intact?
My database has several forms for data entry each with around 100 controls. I want to make sure that users are warned that they have not made any alterations to the record so nothing is being recorded in the underlying table. I have done 2 forms setting the after update property to a boolean updated =true. When the user clicks the close button msgbox checks if updated=true before closing and warns the user if appropriate. Is there a way of programmatically working through all controls to check if their content has altered to save having to laboriously write code for each of the 100 plus controls?
Hope you can help before I go completely mad repeatedly writing thousands of lines of code.
Seasons greetings.
Thank you

SerranoG December 28th, 2004 04:34 PM

You can use the On Dirty event of the entire form. That will signal you that data has been changed somewhere in the entire record.

Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division

skinny December 31st, 2004 09:13 AM

Thanks Greg,
Sorry to say I tried that one already. On opening the form I have coded it to open on the same record as the master form (ie behaving like a subform) so that the primary key field is dirty as soon as it opens. So I'm afraid that will not work.
Is there any way to compare the controls on opening with the same controls on attempting to close the record?
Happy New Year,

All times are GMT -4. The time now is 09:54 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.