Need to enable button when control typed in ?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form with a 'close' button, this button must only be activated when there is a 'resolution' typed in a control. Right now, I have this in the 'lost focus' of the resolution control where I check for an entry. Is there any way to activate this control as soon as the cursor moves out of the text box, rather than the user having to click somewhere else to trigger the 'lost focus' event?
 
try putting it in the control's AfterUpdate event instead.


David said:
I have a form with a 'close' button, this button must only be activated
when there is a 'resolution' typed in a control. Right now, I have this in
the 'lost focus' of the resolution control where I check for an entry. Is
there any way to activate this control as soon as the cursor moves out of
the text box, rather than the user having to click somewhere else to trigger
the 'lost focus' event?
 
I am not sure whether I understood your question correctly.

When the cursor "moves out" of the TextBox, the following
Events will happen on the TextBox:

* BeforeUpdate and AfterUpdate (if there is anything to
update).
* Exit Event
* LostFocus Event

So the LostFocus Event will happen (unless an earlier
Event is cancelled). Normally, these Events will happen
in micro-seconds (unless you have codes requiring lots of
processing in earlier Events)so using LostFocus won't make
any difference.

HTH
Van T. Dinh
MVP (Access)



-----Original Message-----
I have a form with a 'close' button, this button must
only be activated when there is a 'resolution' typed in a
control. Right now, I have this in the 'lost focus' of the
resolution control where I check for an entry. Is there
any way to activate this control as soon as the cursor
moves out of the text box, rather than the user having to
click somewhere else to trigger the 'lost focus' event?
 
Back
Top