My Assistant
![]() ![]() |
|
|
Apr 11 2007, 02:16 PM
Post
#1
|
|
|
UtterAccess Addict Posts: 110 |
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 |
|
|
|
Apr 11 2007, 02:19 PM
Post
#2
|
|
|
UtterAccess VIP Posts: 4,621 From: North Carolina, USA |
|
|
|
|
Apr 11 2007, 02:23 PM
Post
#3
|
|
|
UtterAccess VIP Posts: 31,413 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 |
|
|
|
Apr 11 2007, 02:24 PM
Post
#4
|
|
|
UtterAccess Ruler Posts: 1,048 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 as well. Nevermind (IMG:http://www.utteraccess.com/forum/style_emoticons/default/sad.gif) Edited by: kheilmann on Wed Apr 11 15:25:04 EDT 2007. |
|
|
|
Apr 11 2007, 03:24 PM
Post
#5
|
|
|
UtterAccess Addict Posts: 110 |
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 |
|
|
|
Apr 11 2007, 03:37 PM
Post
#6
|
|
|
UtterAccess VIP Posts: 4,621 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.
Matt |
|
|
|
Apr 11 2007, 04:55 PM
Post
#7
|
|
|
UtterAccess Editor Posts: 16,032 From: Northern Virginia, USA |
|
|
|
|
Apr 11 2007, 05:15 PM
Post
#8
|
|
|
UtterAccess Addict Posts: 110 |
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 Top · Lo-Fi Version | Time is now: 19th June 2013 - 11:53 PM |