How to prevent the Mouse wheel from moving input data in forms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am relatively new to access - and am experiencing a problem where if I use
my mouse wheel, it changes my blanks out my form. Is there any way I can
prevent this? A setting perhaps?

Thanks in advance
 
There is an easier way.

First and foremost, your records turn "Blank" because you are
effectively cycling past your last record, and the form is allowing you
to add a new record. If you have your forms navigation selectors on,
you can watch the record number change.

The easiest way to avoid this from happening is to set your forms
AllowAdditions = False. You can do this be default & permanently by
setting the form property. You can do this in somewhere in the form's
code with:
Me.AllowAdditions = False

But wait! This still lets you cycle through all the past records of
the form. If you don't want to be able to do that, you need to put in
your code:
Me.Filter = "[YourPrimaryKeyIDField]=" & TheActiveRecordIDNumber
Me.FilterOn = True

Now you are effectively "stuck" on that record! The problem is you
probably still want to be able to change records. This starts to get
complicated, but if you have a good grasp at programming I recommend
setting up unbound controls that let you search through and pick which
record you should be looking at. Just don't forget to set the proper
events to disable or redo your filter as well as allowing new records
when appropriate.

Good luck, hope this helps,
~J
 
Hi J,

Great explanation! Thank you

Can I quote you? Do you have a longer name?

Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
strive4peace2006 at yahoo.com
*


There is an easier way.

First and foremost, your records turn "Blank" because you are
effectively cycling past your last record, and the form is allowing you
to add a new record. If you have your forms navigation selectors on,
you can watch the record number change.

The easiest way to avoid this from happening is to set your forms
AllowAdditions = False. You can do this be default & permanently by
setting the form property. You can do this in somewhere in the form's
code with:
Me.AllowAdditions = False

But wait! This still lets you cycle through all the past records of
the form. If you don't want to be able to do that, you need to put in
your code:
Me.Filter = "[YourPrimaryKeyIDField]=" & TheActiveRecordIDNumber
Me.FilterOn = True

Now you are effectively "stuck" on that record! The problem is you
probably still want to be able to change records. This starts to get
complicated, but if you have a good grasp at programming I recommend
setting up unbound controls that let you search through and pick which
record you should be looking at. Just don't forget to set the proper
events to disable or redo your filter as well as allowing new records
when appropriate.

Good luck, hope this helps,
~J
Hi Vi,

here is a link to Stephan Leban's code to turn mouse wheel on or off
http://www.lebans.com/mousewheelonoff.htm

here is a Microsoft link:
ACC2000: How to Detect and Prevent the Mouse Wheel from Scrolling
Through Records in a Form
http://support.microsoft.com/default.aspx?scid=kb;en-us;278379&Product=acc2000


Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 
Quote away, my full name is Jacob but I go by Jay.
Glad I could help!

~J
Hi J,

Great explanation! Thank you

Can I quote you? Do you have a longer name?

Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
strive4peace2006 at yahoo.com
*


There is an easier way.

First and foremost, your records turn "Blank" because you are
effectively cycling past your last record, and the form is allowing you
to add a new record. If you have your forms navigation selectors on,
you can watch the record number change.

The easiest way to avoid this from happening is to set your forms
AllowAdditions = False. You can do this be default & permanently by
setting the form property. You can do this in somewhere in the form's
code with:
Me.AllowAdditions = False

But wait! This still lets you cycle through all the past records of
the form. If you don't want to be able to do that, you need to put in
your code:
Me.Filter = "[YourPrimaryKeyIDField]=" & TheActiveRecordIDNumber
Me.FilterOn = True

Now you are effectively "stuck" on that record! The problem is you
probably still want to be able to change records. This starts to get
complicated, but if you have a good grasp at programming I recommend
setting up unbound controls that let you search through and pick which
record you should be looking at. Just don't forget to set the proper
events to disable or redo your filter as well as allowing new records
when appropriate.

Good luck, hope this helps,
~J
Hi Vi,

here is a link to Stephan Leban's code to turn mouse wheel on or off
http://www.lebans.com/mousewheelonoff.htm

here is a Microsoft link:
ACC2000: How to Detect and Prevent the Mouse Wheel from Scrolling
Through Records in a Form
http://support.microsoft.com/default.aspx?scid=kb;en-us;278379&Product=acc2000


Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



Vi wrote:
Hi,

I am relatively new to access - and am experiencing a problem where if I use
my mouse wheel, it changes my blanks out my form. Is there any way I can
prevent this? A setting perhaps?

Thanks in advance
 
Thanks, J :) I have it tucked away for future reference.

I hope to see more of you, I like the clear way you explain things.

Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*


Quote away, my full name is Jacob but I go by Jay.
Glad I could help!

~J
Hi J,

Great explanation! Thank you

Can I quote you? Do you have a longer name?

Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
strive4peace2006 at yahoo.com
*


There is an easier way.

First and foremost, your records turn "Blank" because you are
effectively cycling past your last record, and the form is allowing you
to add a new record. If you have your forms navigation selectors on,
you can watch the record number change.

The easiest way to avoid this from happening is to set your forms
AllowAdditions = False. You can do this be default & permanently by
setting the form property. You can do this in somewhere in the form's
code with:
Me.AllowAdditions = False

But wait! This still lets you cycle through all the past records of
the form. If you don't want to be able to do that, you need to put in
your code:
Me.Filter = "[YourPrimaryKeyIDField]=" & TheActiveRecordIDNumber
Me.FilterOn = True

Now you are effectively "stuck" on that record! The problem is you
probably still want to be able to change records. This starts to get
complicated, but if you have a good grasp at programming I recommend
setting up unbound controls that let you search through and pick which
record you should be looking at. Just don't forget to set the proper
events to disable or redo your filter as well as allowing new records
when appropriate.

Good luck, hope this helps,
~J

strive4peace wrote:
Hi Vi,

here is a link to Stephan Leban's code to turn mouse wheel on or off
http://www.lebans.com/mousewheelonoff.htm

here is a Microsoft link:
ACC2000: How to Detect and Prevent the Mouse Wheel from Scrolling
Through Records in a Form
http://support.microsoft.com/default.aspx?scid=kb;en-us;278379&Product=acc2000


Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



Vi wrote:
Hi,

I am relatively new to access - and am experiencing a problem where if I use
my mouse wheel, it changes my blanks out my form. Is there any way I can
prevent this? A setting perhaps?

Thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top