The only solution I can come up with so far is to:
Set a filter on the form which is released in code
when a "Next record" buton is pressed.
Put this in your button klick event
Me.Painting = False 'Stop the screen from flickering
Me.FilterOn = False 'Release filter and youre back to rec #1
Me.Bookmark = myBookmark 'Get back to where you where
Me.MoveNext
myBookmark = Me.Bookmark 'Remember where to go next time
Me.Filter = "[YourPrimaryKeyName]=" & Me.YourPrimaryKey
Me.FilterOn = True 'scrolling disabled
Me.Painting = True
For this to work make sure you don't Requery or you'll loose youre bookmark.
This is from top of my head, hope it'll work without too much trouble.
xmad4,
I took a peek at that solution. I had some trouble with it. I was able to disable the mouse but it seemed that everytime I exit the program and re-start, the mouse was abled again.
I have now come up with another way of solving this problem and it can be read att: [blue]faq702-5263[/blue].
Thanks directors for inspiring me to look in to this mater once again and forcing me to come up with a more graceful solution than before. (I hope it is ;-) )
Jollygood, Wow, I'm going to try this one. I'll let you know.
The other one from xmad4 requires some module coding. I got it to work but it's not consistent. It fires up but there are certain situations when it does not work:
Dim blRet As Boolean
blRet = MouseWheelOFF
Maybe the next version of Access will include this as an option...
I've implemented it in an app that I'm developping and it works great. I've even managed to make Access not displaying
the info message. To the user it looks like the form is just ignoring the mouse wheel for the main form, but they can still use it in a sub datasheet/continous form.
I know the logics are some what difficult to follow but it works in Access 2002. That I'm sure off.
So I guess I have to explain the trick in a better way in my faq. At the moment im in short of time but if you like I could send you an example mdb.
The error you mentioned is most likely caused by you creating an event procedure for "Form_MouseWheel" from the Access properties dialog and then copying another one into it from the faq. Try deleting the one automaticaly created by Access.
It works. And if you want me to help you with it just let me know.
jollygood
I've been extemely busy. OK, I ran some things, set up as you suggest in the sample db. My problems start on your third line: Private Sub Form_Error...
I receive 'Expression On Error produced ambiguous name Form_Error
By the way, your setup functions flawlessly. I appreciate your making it available. Where am I erroring?
directorz
The error is exactly what it says. You have declared a procedure more than once wich is forbidden. I sugest that
you step through your form code and remove one of the procedures that ,in this case, looks like this:
Code:
Private Sub Form_Error(DataErr As Integer, Response As Integer)
..
etc
"Form_Error" is the name of the procedure and the above is it's declaration. Next time you get an error like this. Make sure you have installed the Office XP Help files for Access/VBA. They don't by default. And then you can klick the Help button on the error dialog, and mostly you get very helpful information on that error and how to solve it.
Jollygood,
I have corrected the problem...there was a duplicate as you indicate...the error issue is no longer there. Awesome! 2 others however. I am using a multi tab form. The unbound textbox was placed on the first tab of the form. While on the second tab, if I attempt a scroll, I'm taken back to the first tab where the textbox is located. I will try to remove the tab stop...this should prevent this?. Also, on closing the form a pop up appears and says "Access, underneath that is a number '2169' and a box that says 'OK'. Any thoughts. Other than that, all appears OK. I do have the help file installed. Thank you so much.
Directorz
Jollygood,
I've experimented with your scheme in my db and have had a problem with error 2169. I note that in yours, the same error can be produced. I am befuddled (I think that's a word) on how to handle this. Any thoughts?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.