RunObject Form set to Not editable

Hi,

I have a form that call by several form when press button(not subform). For example Form A can call by Form B, C and D. Its call by button properties RunObject., not runmodel funtion.

So my problem is, it is possible Form A can set to editable or not editable depend call by different form. Lets say Form A cannot edit when call by Form B, but editable when call by Form C & D.

I try search the forum but fail, please let me know if any post provided solution.

Thank you.

Yes just create a form variable… and before you call your form from other forms use the below command depending upon your requirement.

myform.EDITABLE := true/false;

Thanks,

Anil.

Hi Anil,

Thank for reply, but unfortunately I try this before and not working. =(

I try add code under OnOpenForm and OnPush function in form B(lets say form A call by form B) but fail.

Thank you.

This code will work… if it is placed in right area and right syntax…!

Anil.

Hi,

Then where you suggest to write the code? I try few ways already, even both side or function but still can’t. Below is my sample code that I try a week ago.

Name DataType Subtype

TestingForm Form FormA

Code Under Form B

Form - OnOpenForm()

TestingForm.editable := false;

TestingBtn - OnPush()

TestingForm.editable := false;

Other way I tried

Case 1

Form A Function - setEditable(EditForm - Boolean)

currform.editable := EditForm;

Form B OnOpenForm or OnPush function

TestingForm.Seteditable(False);

Case 2

Form A OnOpenForm

if NOT formB.editable then

Currform.editable := false;

Thank you

onpush of function from formB if you are calling form A do this…

formB action onpushtrigger() place below code:

forma.seteditable(false)

forma.runmodal();