Two different type of Label?

Would left click right click work? Left click changes the state. Right click runs whatever. If I was doing this I would trap the mouse down event. If the "button" = 2 (right click) then run your function. Easier than all of these other workarounds.
If it works, your suggestion is much easier to maintain. I'm not in front of a PC to test. Doesn't right click show the context menu?
 
Please note that Windows gets involved here because the timing of a double-click is a system setting. Relying on the timer will be sketchy depending on how fast or slow you have set the mouse button-sensitivity speed.

While driving back home, I was exactly thinking the same thing.
Thanks for mentioning though.
 
Doesn't right click show the context menu?
Code:
Private Sub Check0_GotFocus()
  Me.ShortcutMenu = False
End Sub

Private Sub Check0_LostFocus()
  Me.ShortcutMenu = True
End Sub
 
Code:
Private Sub Check0_GotFocus()
  Me.ShortcutMenu = False
End Sub

Private Sub Check0_LostFocus()
  Me.ShortcutMenu = True
End Sub
@MajP I really don't know how to appreciate you.
It's Sunday 1:33 AM here. I'll try it Monday morning as soon as I'm back to my desk.

Thanks again.
 
@MajP I really don't know how to appreciate you
You will have to test the concept to see if it works. With a standard option group it does not. I am not sure how you are designing this.
 
hi @KitaYama

> "Is there any way to fire a function for an associated label?"

no, there isn't. Therefore, what I do in cases where the label needs events, is to cut it and then paste it with nothing selected, than change it's Name to be logical, then:

CLICK event is SetFocus to control that would be associated -- so it behaves as Access would if it was associated. However, if you don't want the label to automatically change the value, then either pop a MsgBox to ask, do something else, or do nothing (that helps Double-Click to properly fire)

Perhaps use Right-Click to do something else -- to me, that's more reliable than Double-click since you have to accomodate if Click happens because the 2nd click wasn't fast enough. Capture right-click in the MouseUp event

> Run a function with any events of check box or its label without changing checkbox state

perhaps use a small command button instead? Maybe with something like as caption?
 
With a standard option group it does not. I am not sure how you are designing this.
It's not option group. There are several checkboxes. Anyhow the idea is promising. I will try and report back.

thanks again.
 

Users who are viewing this thread

Back
Top Bottom