Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scroll disable 4

Status
Not open for further replies.

directorz

Technical User
Mar 4, 2003
142
0
0
US
Hello experts,
Is there a way to limit a form to show only 1 record by disabling the scroll feature of a mouse wheel while in the form

Thank you
Directorz
 
Or even why this occurs. All I see is that we are attempting to scroll records in your sample, go to close and get the error...
 
Thanks for your deebugging work directorz.

The error code you get is not a "real" error. This sulotion is only working because I'm taking advatage of Access built in error handling to cancel the "go to next record" command caused by scrolling the wheel. In the code you downloaded I just assumed that anyone using it might whant to use the Form_Error event for other stuff. So I coded it in a way that unexpected errors aren't hidden during development.
If you are not going to use the Form_Error event for other stuff. Replace all the code in the Form_Error procedure with the following lines:
Code:
  If Screen.ActiveControl.Name = "UnboundTextBox" Then
     Response = acDataErrContinue
  End If
This should solve your problem.
Oups! Allmost forgot. don't place the "UnboundTextBox" on a tab. Put it directly on the form somwhere. If no room. Put it behind the tabs.
[pipe] JollyGood
 
I will give it a shot a let you know. I like the pipe smoking smilie!
 
JollyGood,
Your deal works pretty good so far here. One thing I would like to change though, and don't have the slightest of how at the moment (if you still see this post). Would there be a way to disable the message "You can't change record using your mouse wheel!"? I mean, I would like to disable the mousewheel scrolling function for records with no message/error boxes comming up.

Stephen [infinity]
"Jesus saith unto him, I am the way, the truth, and the life:
no man cometh unto the Father, but by me." John 14:6 KJV
 
Hi Stephen and the rest of you reading this.

I beleive you are using the design from the FAQ.
And I'm sorry I haven't updated it yet.

Have a look at my postings [Jul 6, 2004 -the one with a download link] and [Jul 17, 2004]in this thread, and all your problems are solved :)

Jollygood [pipe]
 
Perfect! I guess it would have paid for me to read a little more closely in all these posts. Thanks a ton, jollygood! [wink]

Stephen [infinity]
"Jesus saith unto him, I am the way, the truth, and the life:
no man cometh unto the Father, but by me." John 14:6 KJV
 
Jollygood, I don't know if you are still reading this post but I just tried your code. It works if the user scrolls once. But then the curser is in the txtbox and if the user continues to scroll, it does move to another record. Is there anyway to get around this?

Thanks
 
aw23,
Try looking at thread705-927339 and see if it gives you any help. Don't know if it will or not, but it sounds like you're on the same page with the user in that thread.

Stephen [infinity]
"Jesus saith unto him, I am the way, the truth, and the life:
no man cometh unto the Father, but by me." John 14:6 KJV
 
Has anyone got this work with access 2000?
I can't see anywhere for a wheel event in 2000...
 
Hi irishjoe, and the rest of you

I don't beleive you have much choice, but to go for one of the .dll, .ocx sulotions if youre running Access2000.

Have a look earlier in this thread (the posting by krymat) that one didn't work for me, but I haven't tried the sulotion you can find in Thread705-927339.

Happy new year too you all! [pipe]
jollygood
 
This sort of works, but the forms flickers.

Code:
Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal Count As Long)
 Me.Form.Recalc
End Sub
 
This question has been asked many times and the solution is not the easiest. Check out the following from Microsoft:


This refers to Access 2000. It is something that can obviously be a major problem and am not sure why MS didn't take this into consideration.

Good Luck!!

An investment in knowledge always pays the best dividends.
by Benjamin Franklin
Autonumber Description - FAQ702-5106
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top