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

Scrolling changes selected record? 1

Status
Not open for further replies.

xezekielx

IS-IT--Management
Jun 30, 2005
93
CA
I just noticed that if I use the mouse wheel on the main form, it changes which record is currently "selected". I certainly DON'T want that to happen. I want the records to be selected within an "Open customer file" form. I set the main form's Cycle property to "Current Record" but it doesn't solve the problem. All subforms also have their Cycle property set to "Current Record". What should I do? Thanks!
 
Wow! Thanks a million times! Just a small question though. Should I put a CMouseWheel object on each subform or only on the main form? Thanks again!
 
I didn't read the article <grin>, so I don't know the answer. I suspect that if the event is at the form level, you will need one for the subforms as well. I would start with only the main form, then see what happens if you click in some field in the subform and spin the wheel.

Good Luck.

"Have a great day today and a better day tomorrow!
 
Thanks a lot for your help, it is much appreciated!
 
According to the small tests I just made, I won't need to put the code in the subforms. Probably because the main form and subforms are linked together. Anyway, everything's working now!
 
Just found out that the code makes Access 2000 crash :( Can anyone help me out?
 
All is not lost -- yet! Can you define "Crash"?

I followed the instructions on the Microsoft website, created the DLL, modified a form in my database, then tried to run it. Ahm, eer, I don't have a mouse wheel... so I moved DB & DLL to my other workstation and tried it.

I got "Can't create object" -- is that what you get?

I tinkered and changed the line from:
Private WithEvents clsMouseWheel As MouseWheel.CMouseWheel

to:
Dim XXX as MouseWheel.CMouseWheel

Then deleted that line and created:
Dim WithEvents clsMouseWheel As MouseWheel.CMouseWheel

And the form worked just fine. When you scroll, you get the proper message.

Then realizing that I would take a beating from the people that really know how to code, I changed everything back to the way it was. Much to my chagrin, it still worked. (Any help to explain why would be appreciated).

FYI - I am running Access 2000 on an XP box.




"Have a great day today and a better day tomorrow!
 
Well everything works until I close the app. In Win98se, I get a KERNEL32.DLL fatal error everytime. In XP, I don't get any error message, but the .ldb file isn't deleted and if I put code (like a MsgBox) in the main form's OnClose event, it won't even show up when I close the application...

I tried using the MS Access code provided in the MSKB link you gave me. I couldn't try the DLL thing because I don't have VB6. It would be awesome if you could send me the DLL at xezekielx@gmail.com. Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top