Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 25th, 2004, 05:04 PM
Registered User
 
Join Date: Mar 2004
Location: , , .
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?

Reply With Quote
  #2 (permalink)  
Old March 25th, 2004, 05:26 PM
Authorized User
 
Join Date: Mar 2004
Location: , , .
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!
Reply With Quote
  #3 (permalink)  
Old March 25th, 2004, 06:56 PM
Registered User
 
Join Date: Mar 2004
Location: , , .
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

Reply With Quote
  #4 (permalink)  
Old March 26th, 2004, 09:50 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Connersville, Indiana, USA.
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!
Reply With Quote
  #5 (permalink)  
Old March 28th, 2004, 06:23 PM
Registered User
 
Join Date: Mar 2004
Location: , , .
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

Reply With Quote
  #6 (permalink)  
Old March 29th, 2004, 04:04 PM
Authorized User
 
Join Date: Mar 2004
Location: , , .
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.
Reply With Quote
  #7 (permalink)  
Old March 30th, 2004, 11:09 AM
Registered User
 
Join Date: Mar 2004
Location: , , .
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




Reply With Quote
  #8 (permalink)  
Old January 19th, 2006, 11:42 AM
Registered User
 
Join Date: Jan 2006
Location: , , .
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.



Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 09:26 AM.


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