Wrox Programmer Forums
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old December 27th, 2004, 06:31 AM
Authorized User
Join Date: Jun 2003
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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

Old December 28th, 2004, 04:34 PM
Friend of Wrox
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG

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
Old December 31st, 2004, 09:13 AM
Authorized User
Join Date: Jun 2003
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts

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,

Similar Threads
Thread Thread Starter Forum Replies Last Post
Database not getting updated vsc33 VB How-To 4 May 15th, 2008 10:30 AM
Database not updated tiredcat Visual Basic 2005 Basics 0 April 24th, 2007 08:49 PM
OPeration must be updated khzahid Classic ASP Basics 1 April 27th, 2005 06:01 PM
Last Updated Record mrideout BOOK: Beginning ASP.NET 1.0 1 September 20th, 2004 09:50 AM
Data not getting updated Renu ASP.NET 1.0 and 1.1 Basics 10 August 21st, 2004 05:39 PM

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