Ajoy, The usual procedure of using a "data object" which is an object containing the current, or in the case of a new record, a blank set of data is used. You do the changes to the data object by binding the object properties to the form controls (textbox etc) and then you can freely manipulate the data in your program using business logic to validate the fields and then commit the object for writing to the database - or adding if it is a new record.
I won't go into the areas of Biz objects at this time as it opens up a whole area of discussion but simply but in simple terms you 1. Load the form 2. In the form init() create an object property to hold the current record or blank record as an object with properties and bind the object properties to the form controls. 3. Get the data record from the underlying table then Scatter the data from the record into the form "data object". You can scatter a blank record which will set the data object up for insertion (see scatter blank memo) 4. Enter/Modify and/or validate the data object properties using standard controls on the form as the data will now be bound to the form controls. Nothing is written away to the DB at this time and only the data object is modified 5. If you want to write the data back to the DB then gather the data back from the form "data object" and write/commit it to the underlying DB table. In this way you can use the same logic on VFP or SQL remote data as the only change needed is the rear/write functions. You can do this using SPT or Table adapters. Personally I don't like TA's, but this is just my opinion. Please don't take this as the only way top do it as I am just trying to show you how you need to separate the data from the underlying database by loading it into an object upon which you perform all the data manipulation/verification etc before writing it away. Dave _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/18725b8cd2d5d247873a2baf401d4ab22a51f...@ex2010-a-fpl.fpl.LOCAL ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.