Sep 21, 2018 If you need to dis-/enable views (e.g. buttons) depending on a condition you can do it by Code: Copy SetButtons(Not(UnameTF.Text=LoggedInUserName)) Sub SetButtons (enabled As Boolean) NewUserBTN.Enabled=enabled UpdateUserBTN.Enabled=enabled PWResetBTN.Enabled=enabled End Sub Here it's about: The logged in user may not change his/her own data (= buttons disabled). Via not the compare (will be true if it's the same user) will be negated by "NOT" Click to expand...
If you need to dis-/enable views (e.g. buttons) depending on a condition you can do it by Code: Copy SetButtons(Not(UnameTF.Text=LoggedInUserName)) Sub SetButtons (enabled As Boolean) NewUserBTN.Enabled=enabled UpdateUserBTN.Enabled=enabled PWResetBTN.Enabled=enabled End Sub Here it's about: The logged in user may not change his/her own data (= buttons disabled). Via not the compare (will be true if it's the same user) will be negated by "NOT"