Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 25th, 2004, 05:04 PM
Registered User
 
Join Date: Mar 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default mouse wheel moves to new record on subform

I have a subform which should allow the user to enter only
one record. The record navigation is disabled and max
records is set to 1. I have discovered that using the
mouse wheel brings me to a blank record in the subform?!!

How can I prevent this?

 
Old March 25th, 2004, 05:26 PM
Authorized User
 
Join Date: Mar 2004
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you are using any version older than Access XP (2002) then Access does not provide a method for preventing users from using the mouse wheel to scroll through records on a form.

A work a round is possible but a pain in the butt… Check out these two links.

For Access 97
http://support.microsoft.com/default...36&Product=acc

For Access 2000
http://support.microsoft.com/default...79&Product=acc

Good luck!
 
Old March 25th, 2004, 06:56 PM
Registered User
 
Join Date: Mar 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks,

I have never created an activeX dll but I guess I need to learn.

LH

 
Old March 26th, 2004, 09:50 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 126
Thanks: 5
Thanked 0 Times in 0 Posts
Default

What about for Office XP?
I have had this same problem, but didn't know that it was preventable.
Thanks!

Regards,
Laura

The only thing standing between you and your goal is doubt. Quit doubting yourself and you'll be able to accomplish anything!
 
Old March 28th, 2004, 06:23 PM
Registered User
 
Join Date: Mar 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Check out this link for an easy solution
http://www.lebans.com/mousewheelonoff.htm

Brad

 
Old March 29th, 2004, 04:04 PM
Authorized User
 
Join Date: Mar 2004
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Laura, I don’t have a copy of Access XP or Access 2003 but I do remember seeing a new EVENT property on forms called “On Mouse Wheel” (or something like that). Can’t help you more than that as I don’t have access to Access XP or Access 2003 anymore – I would guess the help file will have more help and examples of how to use it.
 
Old March 30th, 2004, 11:09 AM
Registered User
 
Join Date: Mar 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I followed the instructions from http://support.microsoft.com/default...79&Product=acc
and it works fine for Access 2002

but

can anyone tell me how I can apply the following code to all of my Access database forms without putting it behind each individual form?

Option Compare Database
Option Explicit

Private WithEvents clsMouseWheel As MouseWheel.CMouseWheel

Private Sub Form_Load()
    Set clsMouseWheel = New MouseWheel.CMouseWheel
    Set clsMouseWheel.Form = Me
    clsMouseWheel.SubClassHookForm
End Sub

Private Sub clsMouseWheel_MouseWheel(Cancel As Integer)
    MsgBox "You cannot use the mouse wheel to scroll records."
    Cancel = True
End Sub




 
Old January 19th, 2006, 11:42 AM
Registered User
 
Join Date: Jan 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Open the subform in design mode, Open the Properties for the Form, goto the data tab, set the Recordset Type to snapshot. This will prevent there from being a "new" record.








Similar Threads
Thread Thread Starter Forum Replies Last Post
Mouse Wheel dartcoach VB How-To 0 November 12th, 2006 03:09 PM
mouse wheel aytacakin Pro JSP 0 November 16th, 2005 04:01 AM
mouse wheel aytacakin Javascript How-To 1 November 15th, 2005 12:10 PM
Mouse Wheel Event BSkelding ASP.NET 1.0 and 1.1 Professional 3 March 30th, 2005 09:12 AM
Mouse Wheel Scroll Help shadowpug VB.NET 2002/2003 Basics 3 July 26th, 2003 02:31 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.