Hide Form Control Following DblClick Event

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dan2kx
    Contributor
    • Oct 2007
    • 365

    Hide Form Control Following DblClick Event

    Hello,

    I have another problem to which i cannot figure out a resolution,
    I have a listbox on a form, on double click event of a row in the listbox i want to run some code, update tables etc
    then i want to run another procedure that updates the "Main" listbox to show the change made in the other, and i want to hide the original listbox, make sense?

    well, i get the error "cannot hide control that has the focus", i understand the error but would like to "do it anyways", i have tried to run other things inbetween and set the focus to something else but nothing works.

    any one got any ideas?

    Dan
  • Dan2kx
    Contributor
    • Oct 2007
    • 365

    #2
    False alarm, i found my answer in the very Next Thread

    Originally posted by missinglinq
    Forms can only get or lose focus if there are no other controls on them that can receive focus. So using these events of either form is futile.
    i was being non-specific in my actions and used

    Code:
    Me.SetFocus
    Code:
    Me.AnyControl.SetFocus
    the latter works

    Comment

    • missinglinq
      Recognized Expert Specialist
      • Nov 2006
      • 3533

      #3
      Glad we could (inadvertently) help you!

      Linq ;0)>

      Comment

      Working...