Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / April 2007

Tip: Looking for answers? Try searching our database.

Mouse Scrolling Wheel Issue

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fuad - 28 Apr 2007 10:26 GMT
One more question to experts: I designed my database so that the user has to
enter the data into the main entry form which opens by clicking "Add new
record" button for new records and for existing ones by double-clicking the
record ID field in the "Existing records" query datasheet. Both event leads
to opening the filtered main entry form limited to either new record or
selected ID record. But scrolling the mouse wheel while entering the data to
this form makes the database create new blank records with new ID's what I
really want to avoid. Is there any way in Access to restrict or disable the
mouse wheel, or "freeze" the entry form for just one entry like query option
provide (but not editable).

Thanks.
Signature

Regards,
Fuad

missinglinq - 28 Apr 2007 11:21 GMT
Stephen Lebans has a sample database that does this and can be downloaded at:

http://www.lebans.com/mousewheelonoff.htm

Download and unzip the db and take a look. In your db and goto File >
External Data > Import and import the module modMouseHook (I think that's the
name) from  the sample database.

You may or may not have to place a copy of the MouseHook.dll in the same
folder as your database. Sometimes it works from the standard location,
sometimes it doesn’t. It’s normally a Hidden file, so you’ll have to unhide
it, Find it, then copy it to the folder.

In the first form to load in your db use this code:

Private Sub Form_Load()
  ' Turn off Mouse Scroll
   blRet = MouseWheelOFF
End Sub

Signature

There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Fuad - 30 Apr 2007 07:56 GMT
Thanks for advice, it works well, but only one issue: while adding a new
record to my main form, the subform linked with the main form by the main
form ID creates 2 records per each main record in its table: one is empty
(only main ID), another is normally filled with all data. I think it's just
Access feature: new record becomes current and other one is reserved as new
record and after all this events mouselock activates...otherwise it can't
block an Access new record creation event.
Anyway that's much better than creating hundreds of blank records by
accidental wheel scrolling...

Thanks.

Signature

Regards,
Fuad

> Stephen Lebans has a sample database that does this and can be downloaded at:
>
[quoted text clipped - 15 lines]
>     blRet = MouseWheelOFF
> End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.