Button not dimmed Button not dimmed peruchoa (Programmer) (OP) 22 Jun 00 11:22 I have a screen form with a button that I disable if I'm going to add records, otherwise the button is active.Now, in the When() properties of the button I can disable but the button remains bright, not dimmed.That's my question: how to dimmed the button ?Thanks in advance for your help. RE: Button not dimmed AMakovoz (MIS) 22 Jun 00 13:02 Try to disable the button not from within the button's When method (since When is activated only when control is passed to this button) but from Click (or other appropriate event)method of the control which make you decide to Add records. Did I make myself clear? RE: Button not dimmed jonscott8 (Programmer) 22 Jun 00 16:35 Hi Perucha, A good programming technique to use, when speaking of enabling/disabling controls, is to use the Refresh() event of the control.For Example:If you have a command button you only want enabled when the user has entered something into a text box (example: a password text box and login button), you would put code in the refresh event of the button that looks like this:THIS.ENABLED = ! EMPTY(THISFORM.txtPassword.Value)In the textbox's Interactive Change event, you would call THISFORM.REFRESH(). This way, anytime the user changes the contents of the textbox, the command button will check and see if it needs to be disabled or enabled.And in the Form's refresh event, its also good practice to explicitly refresh the controls that have code in their refresh method. Example: In the form's refresh:THIS.cmdLogin.REFRESH()HTHJon RE: Button not dimmed peruchoa (Programmer) (OP) 23 Jun 00 10:17 THANK YOU Jonscott8 !!!Four days fighting with the little button, the solution it's done.Thank you Amakovoz too.