Lookup form Editable based on calling form?

The time change has made me sleepy and I can’t think straight! What is the best way to make a Lookup Form editable or not based on which form opened the lookup? Form A and B both show form C via lookup. I would like to have C editable from A, but read-only if opened from A. Thanks, john

Ooops! I meant if “…opened from B?” Sorry.

Can you use this: :: OnOpenForm() IF THEN CurrForm.EDITABLE(FALSE); :: could be “CurrForm.LOOKUPMODE” or a parameter sent from form A and B.

Another way is: On Form A: WITH frm_FormC DO BEGIN // possible assignment SETRECORD(…); // possible assignment SETTABLEVIEW(…); EDITABLE(TRUE); RUNMODAL; // or RUN with possible comparison END; On Form B make EDITABLE(FALSE); Jozef Kovac

If you are trying to prevent user from editing “by mistake”, you can set the property InlineEditing to TRUE on the form’s TableBox. The user now have to press F2 to begin editing.