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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Issue with mousewheel

Status
Not open for further replies.

ahau

Programmer
Apr 19, 2006
51
AU
Hi,

I have a question in regards to the mousewheelonoff. I've the code from the internet and it works fine. The mousewheel can be set off or on. Great. However, it has to have the mousehook.dll sitting on the same folder as the database. My question is is there any way of incorporating this dll into the database so that if i want to send the database to my client. I don't have to send two items to them as they don't know what the dll is. I'd rather to make it seem as if it's only one big database.

Or is there any other codes that doesn't require mousehook.dll?

Thank you for your help in advance
 
Try this thread:
thread181-1181597

Basically, it says that you can leave the mousewheel on if you use the form events correctly (and how to figure that out).
 
Hi Pseale,

Thank you for your reply.

Thanks for the link. I tried the link suggested by PHV but could not get thru due to the other end server might be down.

However, the thread that you directed me to did talk about the mousewheel and the active X control too. I think i have a different situation here. I don't have any control button to move thru the records.

Basically what happen is that i have a form full of textboxes filled up with information. No other buttons is founded other than the close button to close the form. Then, because the form is quite long, i thought i could use the mousewheel to scroll down but instead, it causes all the information in the textboxes to disappear and they will return to appear again if you scroll it the wheel backward. I don't know if this's got to do with active X button.

All i want it to do is not to cause all the information to disappear but rather stay on the same record.

I hope i have explained it well.

Thank you very much in advance
 
Check your form properties?

Data Entry = No
Cycle = Current Record

Hope this helps.
 
Hi Jkl0,

Thank you for your help.

I have tried to do as you said and that is to set Data Entry to 0 and Cycle = current record.

But the problem still occurs when i move the mousewheel. All the information or data in the textboxes disappear when i move the mousewheel backward that is move the wheel back toward you. And if i move it in the opposite direction, they come back showing on the textbox again. I think i need to disable the mousewheel somehow unless there are other ways of getting around this problem. I have a code to disable the mousewheel but it requires the mousehook.dll that has to be kept in the same folder as the database. I find it inconvenient and annoying because i have to think about the dll when sending the database to someone's else. Otherwise, you'll get a error message saying couldn't find mousehook.dll.

Honestly, i don't mind using the mousehook.dll if it can be incorporated into the database. Is there any other way?

Thank you very much in advance.
 
The following link is the only thing that I can find that doesn't use the mousehook.dll, but the method seems to have it's own quirk.

faq181-871

Hopr this helps.
 
Also found this link. May be better.

faq702-5263
 
Here's another way (this works very well!!!)

Create a subform (LogForm) on your form (CheckForm).
Then place the following code behind the form for the [Event Procedure] of Mouse Wheel....


Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal Count As Long)
If Count > 0 And Form.CurrentRecord <> 1 Then
DoCmd.GoToRecord , , acPrevious
Else
If Form.CurrentRecord <> Form.Recordset.RecordCount Then
DoCmd.GoToRecord , , acNext
End If
End If
Forms!CheckForm!LogForm.SetFocus
End Sub



***There is a little glitch...the first record WILL scroll to the second record...the last record WILL scroll to the second to last record. I have had little luck trying to prevent this...
 
Thank you Jkl0 and asdffdsafdsa for your help.

Jkl0, the code in the link you showed does work really well on the form. However, there is a little problem with the code and that is it works if the unboundtextbox is visible. when the visible set to false, it no longer works. But that's alright, i'd probably live with that for now.

asdffdsafdsa, it doesn't work on my form. I might have missed something here. I created the subform, put it into the form, named it LogForm. Then, i put the code into the mousewheel event procedure. the mousewheel still does the problem with the record in the form. Do i miss anything?

Thank you in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top