Subform Issue

souravbsouravb Member Posts: 135
Hi,
I have a Header Detail form. When i press a Button on the Form, all the Header fields and two fields in the subform will become non editable. Remaining 2 fields in subform will be open to input. The Problem is i can make the subform completely non editable but not individual fields (tha 2 fields required). How to acheive that. Plz help.

Comments

  • Revolution1210Revolution1210 Member Posts: 161
    This would be one way to do it:

    Name your SubForm control (the one on your main form), e.g. SalesLines

    Create a function on your actual sub form object, e.g., SetEditable
    Code may look something like this;
    CurrForm."No.".EDITBALE(FALSE);
    CurrForm.Description.EDITBALE(FALSE);
    

    Call the function from you main (header) form as required. e.g.,
    CurrForm.SalesLines.FORM.SetEditable;
    

    You may also want to elaborate on this by adding parameters to the Set Editable function, giving you the ability to turn controls on/off using the same function call, eg., SetEditable(TRUE), turns controls on, SetEditable(FALSE), turns controls off.
    Ian

    www.NextEqualZero.com
    A technical eye on Dynamics NAV
Sign In or Register to comment.