Disabling Mouse Wheel & Subforms

  • Thread starter Thread starter PammiePi
  • Start date Start date
P

PammiePi

Guest
There must be a way to do this. I can't download the dll fix I've read about because of company policy...is there anything I can put in the following code which will force the subform to go back to the record or refresh the subform on the mouse wheel event?

Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal Count As Long)
'MsgBox "Do Not Use Mouse Wheel To Navigate!", vbExclamation, "Mouse Trap"
Insert code here
End Sub


Sorry...fairly new to VB...still learning
:confused:
 
Try putting this where you say insert code


DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
 
I tried that & got "command unavailable". Yesterday I had tried using code for the menu command for previous record, but I suspect I have the wrong menu name for the command I want to use, because the code does nothing, but if I click on records>previous after the mouse wheel moves the subform to a blank page, the data reappears.

The code I am using is: DoCmd.DoMenuItem acFormBar, acRecordsMenu, acPreview, , acMenuVer70

I guess I just need the correct name of the menu bar.

This is kind of critical since I don't want the users corrupting data.

Thanks for any help...I'll keep trying. :o
 
Thanks. I ran across that yesterday, but we're not supposed to d/l anything. I'll d/l it to my home PC & modify it there, I guess...that is, if they want their form to work properly.

I'll let you know how it worked. I have a ton of validation code in my Access application, so I'm curious to see how it works. This is what I get for telling them I used to program back in the mid-80's... :p

Oh well, at least it's fun. VB is a lot nicer then that spaghetti code I used to have to work with. :)

-Pammie
 

Users who are viewing this thread

Back
Top Bottom