Insert record in non-editable form

Hi, Depending on the user I make the contact card editable or non-editable. The user with the non-editable contact card is however allowed to insert new records. When the complete form is non-editable it is not possible to insert a new record. Who can help me with this problem.

Give a try making the property editable to true at OnInsertRecord event of the form… Best regards, Anu

The new records should also be modifiable (in a period), I presume, after the insert? - I think you have a catch-22 here.

The contact card is non-editable depending on the user and the status of the contact card. The user with the non-editable contact card can only insert new records and modify his owm records with a certain status. If the user already had records with this certain status there is no problem. The user can insert a new records, but if there are no records with this status al contact cards are non-editable an no new record can be inserted.

It looks like you may have to add one more field “creted user id” for each card and then can make the form editable/non-editable based on user id.

Add a Menu Button with properties: Name=mnuInsert Caption=Insert HorizGlue=Right VertGlue=Bottom and a menu item with properties: Name=New ShortCutKey=F3 and put this code in it’s “OnPush” trigger: // >> RESET; CLEAR(Rec); “No.” := ‘’; { The code to setup this record should be in the “OnInsert” trigger of the table. Otherwise create a function on the form and call it here and from the “OnNewRecord” trigger. } INSERT(TRUE); // If the “Number Series” allows defaults. SETRANGE(“No.”,“No.”); // << On the form put this code in the “OnAfterGetCurrRecord” trigger: // >> CurrForm.EDITABLE( AND ); // e.g. (“Created by” = USERID) CurrForm.mnuInsert.VISIBLE(WRITEPERMISSION AND (NOT CurrForm.EDITABLE)); // <<