UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> How to you Prevent Mouse Wheel Scroll from adding records?    
 
   
Zavenstar
post Apr 11 2007, 02:16 PM
Post#1



Posts: 110
Joined: 1-November 06



Hi
My form is set to add new records and is set to form only.
However if the mousewheel is depressed and scrolled forward multiple blank records are created.
I want to prevent the mousewheel from working while adding records through the form.
Thanx
Z
Go to the top of the page
 
MattJ
post Apr 11 2007, 02:19 PM
Post#2


UtterAccess VIP
Posts: 4,621
Joined: 12-November 03
From: North Carolina, USA


See here.
TH
Matt
Go to the top of the page
 
freakazeud
post Apr 11 2007, 02:23 PM
Post#3


UtterAccess VIP
Posts: 31,413
Joined: 23-September 04
From: NC, USA


Hi,
since you didn't provide a version you will be using this in I just want to let you know that this issue has been fixed in Access 2007 when in Single form view.
HTH
Good luck
Go to the top of the page
 
AC2Designs
post Apr 11 2007, 02:24 PM
Post#4



Posts: 1,048
Joined: 17-December 08
From: Fort Worth, Texas


You could do a few things...
1. Set some of the fields to either REQUIRED = YES
2. Set Form AllowAdditions = NO, and create a Button that resets it to YES and Goes to New Rec when clicked...

Other than that you could test your Mouse settings in Control Panel, but that would obviously effect other apps
Has well.


Nevermind sad.gif
Edited by: kheilmann on Wed Apr 11 15:25:04 EDT 2007.
Go to the top of the page
 
Zavenstar
post Apr 11 2007, 03:24 PM
Post#5



Posts: 110
Joined: 1-November 06



Hi
Thank you for all the replies, and some interesting solutions.
I thought that the code to disable the wheelmouse would be the same for all versions.
I am currently working in access2000 and access2003 and if there are specific solutions for these
two versions I would be interested.
Z
Go to the top of the page
 
MattJ
post Apr 11 2007, 03:37 PM
Post#6


UtterAccess VIP
Posts: 4,621
Joined: 12-November 03
From: North Carolina, USA


The code using the mousehook.dll works for the 2000 and 2003 versions. It originally came from here. A updated demo in 2000 format is available there.
att
Go to the top of the page
 
datAdrenaline
post Apr 11 2007, 04:55 PM
Post#7


UtterAccess Editor
Posts: 17,941
Joined: 4-December 03
From: Northern Virginia, USA


I use a different method ....
Alternative Mouse Wheel Disable
Go to the top of the page
 
Zavenstar
post Apr 11 2007, 05:15 PM
Post#8



Posts: 110
Joined: 1-November 06



Hi again
The first solution from matti worked great.
The method is as follows:
1.The form is set to add new records and is set to single form .
2. When the form loads the onCurrent event after initializing some controls is set to Me.AllowAdditions = False.
3. A command control labelled "Add Load" on the form has the code in the onclick event as follows:
- Me.AllowAdditions = True
- DoCmd.GoToRecord acActiveDataObject, , acNewRec
4. the onCurrent event is fired again and sets the form's Me.AllowAdditions = False.
This completely negated the mousewheel from adding new records.
Some additional benefits acrued:
- the mousewheel could still be used in my continuous records subform.
- the mousewheel could still scroll backwards to the just added records.
Thanx again for all your solutions
Z
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    18th December 2017 - 11:48 AM