Gustav Brock
gustav at cactus.dk
Mon Mar 24 07:44:31 CDT 2014
Hi Jim You have a point here. A nice tool could be LightSwitch, and a place to start could be here: http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/3250/An-End-To-End-Visual-Studio-LightSwitch-2013-HTML5-Application.aspx Do recall that a LightSwitch app can be changed from a desktop app to a web app and vice-versa by flipping one switch. /gustav -----Oprindelig meddelelse----- Fra: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] På vegne af Jim Dettman Sendt: 24. marts 2014 13:07 Til: 'Access Developers discussion and problem solving' Emne: Re: [AccessD] Unbound Form Check For Changes I would have to add, I'd go with something other then Access as well. If your going to go the unbound route, then at this point in time, then why would you bother to use Access? The whole point of using Access is the features that are built-in, such as bound forms. If your not going to bother with that, then you could just as easily using VB6/VB.Net/C# with Winforms and not get all the Access baggage. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John W Colby Sent: Sunday, March 23, 2014 09:02 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Unbound Form Check For Changes And having done all that stuff, I would go with a class. All of the code to check old value = new value, a dirty flag and so forth can be stored in the class. John W. Colby Reality is what refuses to go away when you do not believe in it On 3/23/2014 7:04 PM, Bill Benson wrote: > Re: Dirty, even if bound, a change would mean the user began to edit > the form, not that they necessarily "made" a change. > > As for storing the control values, if all you care about is testing if > ANY controls changed, I would put a tag in every control where this is > a possibility and loop through all controls, test for this tag - then > you won't have to worry about labels and controls with no value > throwing off a runtime error. I would just store all values in a > single string using a pipe > separator, and check this again later. > > 'Warning air code!!! > Option explicit > Dim m_Initial_Control_Values as String > > Form_Load() > For each ctrl in controls > If ctrl.tag = "ValidateMe" then > m_Initial_Control_Values = _ > m_Initial_Control_Values &"|" & NZ(ctrl.value,"") &"|" > End If > Next > '... > End Sub > > Have a function named FormChanged > > Function FormChanged() as Boolean > Dim strValidate as string > For each ctrl in controls > If ctrl.tag = "ValidateMe" then > strValidate = _ > strValidate &"|" & NZ(ctrl.value,"") &"|" > End If > Next > > FormChanged = (strValidate <> m_Initial_Control_Values)