disable control in request form

jam176jam176 Member Posts: 27
is there any possibility to en-/disable a checkbox in a request form of a report using the OnInit trigger? the checkbox should only be enabled if one specific user is logged in.
thx
jam176

Comments

  • OliverTOliverT Member Posts: 37
    yes, there is a way to do this!

    step 1:
    the control needs a name

    step 2:
    write the following code in the trigger OnOpenForm (not OnInit) of the request form:
    IF USERID = [Your specific UserId] THEN
      RequestOptionsForm.[your Controlname].ENABLED(FALSE);
    
    that's all

    but wouldn't it be better to use the property "VISIBLE" instead of "ENABLED"? that way no other user would ask himself what he has to do to select this field ;)
  • jam176jam176 Member Posts: 27
    cool! that's it! the missing link was >RequestOptionsForm< !

    vielen dank!
    thx
    jam176
Sign In or Register to comment.