Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MouseWheel

Status
Not open for further replies.

debbieg

Technical User
Dec 2, 2002
190
US
I have a main form with 3 subforms. I want to allow the users to use the MouseWheel to navigate the main form but I'm having troubles. Here's my code:
Code:
Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal Count As Long)
    If Count > 0 Then
        Call cmdPrevious_Click
    Else
        Call cmdNext_Click
    End If
End Sub
cmdPrevious and cmdNext work fine. But when I use the MouseWheel it looks like it's trying but won't move off the current record.

Any suggestions?

Debbie
 
As a side question ...

If I wanted to see if the mousewheel has been used, how can I use the arguments of the Form_MouseWheel (Page, Count)? Like if Page = True.

I always have trouble calling stuff if they have arguments.

Debbie
 
I fixed my problem but now I'm just curious.

I tried adding this to Form_Current:

Dim test1 As Boolean
Dim test2 As Long
Call Form_MouseWheel(test1, test2)
MsgBox "test1 = " & test1
MsgBox "test2 = " & test2


If I change records, test1 = False and test2 = 0.

What is a Page to the MouseWheel? If I use the MouseWheel Page = False. I figured Page was when I changed records and Count was how many records.

Thanks to anyone who can answer my curiosity,
Debbie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top