Mouse Scrolling Wheel Issue

G

Guest

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.
 
M

missinglinq via AccessMonster.com

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

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

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top