After looking at lots of posts in different forums, I still can't find the API trick to scroll about precisely in a regular form.
I've taken out all the constants and distilled the API command to its simplest form for testing.
This is the API declare:
Public Declare PtrSafe Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As LongPtr, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
These three lines are to test moving the scroll bar. The first two work but in the third one I'm trying to precisely position the scroll bar much finer than by a "line", which moves too much.
Code:
SendMessage Me.hWnd, 277, 6, 0 'goes to top of the form
SendMessage Me.hWnd, 277, 1, 0 'goes down one line
SendMessage Me.hWnd, 277, 5, 9999 'trying to move a precise amount, can't find the trick
No matter what I enter for the 4th argument in the third line, it scrolls to the top of the form.
For C++ documentation I see something about a SetScrollInfo, so maybe the 2-4 parameters are wrong for the fine-tuning part.
I looked at the Lebans idea, some said it doesn't work in newer versions of Access. With Office 365 I can't open the .mdb file to peek.
Got any ideas for the third?