Source language: Translate to:

Lock record from editing

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Lock record from editing

Postby donmichel » Mon Jun 27, 2011 10:27 am

What is the best way to lock a database record so that it cannot be edited after a button is pressed?
donmichel
 
Posts: 38
Joined: Sun Sep 14, 2008 1:25 am

Postby Neosoft Support » Mon Jun 27, 2011 10:32 am

If you use a grid for editing, the record will be locked automatically. If you use NeoBook objects, then the record will only be locked at the time the data is posted. There is currently no method for manually locking a record.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby donmichel » Mon Jun 27, 2011 10:43 am

My situation is this:
I want to issue certificates to people who have finished their terms. Then I want to press a button or check a checkbox in the form view so that the current record is locked for further editing. Any possible way?
donmichel
 
Posts: 38
Joined: Sun Sep 14, 2008 1:25 am

Postby Neosoft Support » Mon Jun 27, 2011 11:16 am

Just add a boolean field to your table and when you want to "lock" that record, set the field to TRUE. Then when navigating records if you encounter one where this field is "TRUE" disable the objects (Text Entry Fields, etc.) that are normally used to edit data. Your table's "on change" subroutine is a good place to put this type of code.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby donmichel » Tue Jun 28, 2011 7:03 am

I am also thinking of grouping the text entry and combo boxes and disabling them in one go. Thanks for the prompt reply.
donmichel
 
Posts: 38
Joined: Sun Sep 14, 2008 1:25 am


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 1 guest