Hey guyz,
I am in a bit of a dilema. I have been looking through this form for hours but still havent been able to figure it out.
I have a form with a field called employee (which is off type boolean) and a field called "employee No." (is of type text).
If I click the Employee field then only I want it to show employee no. as an editable field. However, if the employee field is unchecked, i want it to update the 'employee no.' field by making it un-editable.
I have part of this working. But it doesnt update my fields right away. I have to close the form and run it again for it to update my field. which is sorta pointless.
I have this code in OnOpenForm trigger and OnAfterGetRecord.
IF Employee = FALSE THEN
BEGIN
CurrForm."Employee No.".Editable(FALSE);
CurrForm."Employee No.".ENABLED(FALSE);
END
ELSE
CurrForm."Employee No.".Editable(true);
CurrForm."Employee No.".enabled(true);
So if employee is checked, i want it update the record and make "employee No." editable and enabled right away.
Thanks
Comments
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
that was easy..it worked...thanks...
OHHH it makes so much more sense now...idk why i didnt think about it.
THNKS
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Why?
i have to only show employee no. field as an editable field if employee has been ticked off.
Also after these lines write This is mandatory if you are setting checkboxes (in)editable