How to make a commad button show a new record

A

AccessDB

I know the code for a command button to show a new record is:
DoCmd.GoToRecord , , acNewRec
But the question I have is, how do I stop the mouse scrolltab action
from moving to a previous or new reocord.
I only want the command button of new record and command button of
previous buttons to move the records back and forth. Can I get help on
this matter.
 
A

Allen Browne

If you really want to disable the mouse wheel, see:
http://www.lebans.com/mousewheelonoff.htm

But *why* you wish to put the user into a straight jacket and prevent them
using the familiar ways to functionality to move records?

To do that you would need to set the Cycle property of the form, remove the
navigation buttons, use custom menus, toolbars, and shortcut menus, disable
filtering and sorting, reassign any keystrokes such as PgUp, PgDn, and those
associated with requerying, etc, etc.

In many cases, people want to lock the user into a particular sequence just
because they don't understand how to work with the events Access fires, and
so they try to force the user into a particular procedural sequence. If you
have a genuine reason for disabling all the built-in functionality, you have
a lot of work to do.
 
A

AccessDB

If you really want to disable the mouse wheel, see:
http://www.lebans.com/mousewheelonoff.htm

But *why* you wish to put the user into a straight jacket and prevent them
using the familiar ways to functionality to move records?

To do that you would need to set the Cycle property of the form, remove the
navigation buttons, use custom menus, toolbars, and shortcut menus, disable
filtering and sorting, reassign any keystrokes such as PgUp, PgDn, and those
associated with requerying, etc, etc.

In many cases, people want to lock the user into a particular sequence just
because they don't understand how to work with the events Access fires, and
so they try to force the user into a particular procedural sequence. If you
have a genuine reason for disabling all the built-in functionality, you have
a lot of work to do.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.






- Show quoted text -

Thank you. I'll give it a try. Users are complaining that every time
they are entering data into to form and use the mouse srcoll, tab
button, and enter button the form goes to a record. And most cases,
the user didn't want that to happen.
 
A

Allen Browne

Ah: Microsoft has adjusted Access 2007 so that the mouse wheel doesn't
scroll to another record in Form view. (It still does in Datasheet or
Continuous view, where scrolling makes good sense.)

The Cycle property of the form will prevent it tabbing to a new record.
 

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

Top