There is another solution to the mousewheel changing records problem. Its alot more simple than the dll fix.
Create a textbox on your form with the following properties:
Name: NoMouseWheel
Backstyle: Transparent
Backcolor: 2147483633
Borderstyle: Transparent
Special Effect: flat
Default Value: " "
Validation Rule: WheelSpin()=False
Validation Text: You cannot use the mouse wheel to change records
Enabled: Yes
Locked: No
Then place the following code in your forms module:
Private Enum wsTrigger
MyWheel = 1
NotTheWheel = 2
End Enum
Private mWheel As Boolean
Private ValidationTrigger As wsTrigger
Private Function WheelSpin() As Integer
WheelSpin = mWheel
Select Case ValidationTrigger
Case NotTheWheel
mWheel = False
End Select
End Function
Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal Count As Long)
On Error GoTo Sub_Err
mWheel = True
ValidationTrigger = MyWheel
Me.NoMouseWheel.SetFocus
Me.NoMouseWheel.TEXT = " "
Sub_Exit:
ValidationTrigger = NotTheWheel
Exit Sub
Sub_Err:
Resume Sub_Exit
End Sub
_____________________________
And its that easy,
John
Create a textbox on your form with the following properties:
Name: NoMouseWheel
Backstyle: Transparent
Backcolor: 2147483633
Borderstyle: Transparent
Special Effect: flat
Default Value: " "
Validation Rule: WheelSpin()=False
Validation Text: You cannot use the mouse wheel to change records
Enabled: Yes
Locked: No
Then place the following code in your forms module:
Private Enum wsTrigger
MyWheel = 1
NotTheWheel = 2
End Enum
Private mWheel As Boolean
Private ValidationTrigger As wsTrigger
Private Function WheelSpin() As Integer
WheelSpin = mWheel
Select Case ValidationTrigger
Case NotTheWheel
mWheel = False
End Select
End Function
Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal Count As Long)
On Error GoTo Sub_Err
mWheel = True
ValidationTrigger = MyWheel
Me.NoMouseWheel.SetFocus
Me.NoMouseWheel.TEXT = " "
Sub_Exit:
ValidationTrigger = NotTheWheel
Exit Sub
Sub_Err:
Resume Sub_Exit
End Sub
_____________________________
And its that easy,
John