473,394 Members | 1,761 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

how to avoid the coming of next records when we scroll the mouse in a form

sir,
i have a form created using wizard from table questions.My problem is when i scroll the mouse next records are coming.can we avoid next records to come when we scroll the mouse.i want to be in the same record even when we scroll the mouse.
if so please give the code
thanks in advance.
Apr 12 '07 #1
1 1451
pks00
280 Expert 100+
Looks like u need code to disable mouse scrolling

Ok, two links
1st from MS (two samples)
2nd from Lebans

I prefer the first sample from MS, I have used it without any problems.
I have created the vb dll already and u can download it from here

or if u have vb already installed, u can create it yourself

and if u use the vb dll/approach from ms, full instructins are available in that link provided, or read below

save dll in some directory eg \windows\system32
add this vbdll as a reference (Tools/References)


then in code do this this

Expand|Select|Wrap|Line Numbers
  1. Option Compare Database
  2. Option Explicit
  3.  
  4. Private WithEvents clsMouseWheel As MouseWheel.CMouseWheel
  5.  
  6. Private Sub Form_Load()
  7.     Set clsMouseWheel = New MouseWheel.CMouseWheel
  8.     Set clsMouseWheel.Form = Me
  9.     clsMouseWheel.SubClassHookForm
  10. End Sub
  11.  
  12. Private Sub Form_Close()
  13.    clsMouseWheel.SubClassUnHookForm
  14.    Set clsMouseWheel.Form = Nothing
  15.    Set clsMouseWheel = Nothing
  16. End Sub
  17.  
  18. Private Sub clsMouseWheel_MouseWheel(Cancel As Integer)
  19.     MsgBox "You cannot use the mouse wheel to scroll records."
  20.     Cancel = True
  21. End Sub
  22.  
Save and restart access and give it a go
Apr 12 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

24
by: el_roachmeister | last post by:
Is there a way to make a text link post to a form without passing all the parameters in the url? The urls tend to get very long and messy. I often wonder if there is a limit to how long they can...
6
by: Robin S. | last post by:
**Eric and Salad - thank you both for the polite kick in the butt. I hope I've done a better job of explaining myself below. I am trying to produce a form to add products to a table (new...
6
by: Debbie | last post by:
Hi Stephen, I'm trying to use your mousehook off...and thanks so much... it's such a blessing that you share with the rest of us. I have the dll in the same folder as the database and placed...
1
by: Marcin | last post by:
Im using MS Access 2000. i have a main form and ona subform that is scrolled vertically. unfortunately i use mouse scroll to scroll this subform. I appreciate your help
3
by: Brian Tkatch | last post by:
I have a form with two DataGrids, which are kept in sync manually via Stored PROCEDURE calls. That is, when a record is selected on the first grid, a stored PROCEDURE is CALLed to Fill() the next...
2
by: Denis | last post by:
In a form, how do I disable the mouse wheel button from scrolling through records? I have disabled the navigation buttons at the button of the form and don't want a user to be able scroll through...
16
by: Richard Maher | last post by:
Hi, I have this Applet-hosted Socket connection to my server and in an ONevent/function I am retrieving all these lovely rows from the server and inserting them into the Select-List. (The on...
1
by: AnotherFranklin | last post by:
I recently edited a 2003 Access Database using the 2007 version. When using it with 2007, using the scroll wheel on the mouse when one is a form will scroll the page up & down. However, one of...
2
by: ilikebirds | last post by:
Access 2003: I notice that on a form there is a menu for RECORDS - Data Entry. What occurs here is when data is updated and the option is selected It enters the data into the table and starts...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.