I am just curious if it is possible to be able to scroll through a ListBox with just a mouseover? Or, do you need to set focus on the ListBox before being able to scroll?
I am just curious if it is possible to be able to scroll through a ListBox with just a mouseover? Or, do you need to set focus on the ListBox before being able to scroll?
That would probably involve MouseMove event of the form. No idea what the code would be like except probably complicated.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Did a little research and found out that it is possible to do a setfocus while mousing over. Is it possible to somehow keep track of my previous control? When I move outside the listbox, I would like to return to the previous control.
I suppose to clarify, is it possible to keep a global variable while the form is open that will change according to the control.name property without requiring a timer loop to check ActiveControl or also requiring adding a OnGotFocus event to every control?
You can explicitly reference control to set focus on.
Review
http://msdn.microsoft.com/en-us/libr...ffice.11).aspx
https://www.accessforums.net/forms/i...tml#post215110
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
This actually seems to be quite simple using the previouscontrol function. However, I want to set the trigger to go back to the previous function to be on the activeform.detail.onmousemove property. However, I do not want this to continue non-stop while I am hovering over "detail".
I set this into a Macro.
And when you hover over the listbox, this runs.Code:Function MouseOver() Screen.PreviousControl.SetFocus Screen.ActiveForm.Detail.OnMouseMove = "" End Function
This is where I am unsure how to make a reference to the macro containing the first function.Code:Private Sub List2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Me.List2.SetFocus Me.Detail.OnMouseMove = "........" End Sub
Sorry, I am lost and no interest in figuring it out. I wish you luck.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
All I want to know is how to set an event to trigger a function through VBA.
A Function is designed to return a value to calling procedure and therefore must be part of an equation:
x = MyFunction()
For a function to return a value:
Function MyFunction()
'do some code
MyFunction = something
End Function
What sort of value should be returned to the MouseMove?
A Sub can simply be invoked.
Call MySub
Either procedure can be designed to require arguments.
BTW, these are not macros, they are VBA procedures.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.