Key Assignments

  • Thread starter Thread starter JRF
  • Start date Start date
J

JRF

I'm recreating a database that was originally in a DOS program and the
company wants the keystrokes to mimic the old program to provide easier
migration. Is it better to use macro key assignments or use VBA code.

I know it's not a good idea to use macros for programming but I can find
very little in documentation pertaining to this. It all seems to point to
using macros and then assign the keystrokes to an AutoKey macro. Also, can
the escape key be programmed to back out of a view or to go the a control?

All help is appreciated.

Thanks,
JF
 
Hi,


One of the "beauty" of Windows is that no program uses "Ctrl_Alt_Del"
to save a file... things you can eventually do, in DOS. Use the Tab key to
navigate through controls, or use the mouse, and use Esc to "cancel" stuff
(once to undo the actual control, twice in succession to undo the whole
form). There are just things that a standard Windows user expect, like F1 to
display the help file, F5 to refresh. Learning those is not just for one
program, but for most Windows programs. To close the form having the focus,
use Ctrl_F4. No programming required, and once you know it, again, it is
good in all Windows program (that behave like a Windows program). I think
you can easily convince your users that uniformity is worth the little extra
time it take to learn it... Note that you can use the mouse rather than
remembering the keyboard shortcut, if your users prefer...

I doubt all the keys can be captured through AutoKey macro.

The advantage of a visual environment should be that the interaction is
visually evident. If you need to print something, do not impose a key
combination only, add a button with the picture of a printer over it! You
minimize the training required to use a new application, when there is
visual evidence... take advantage of being graphical!



Vanderghast, Access MVP
 
Thanks. That makes a lot of sense.
J
Michel Walsh said:
Hi,


One of the "beauty" of Windows is that no program uses "Ctrl_Alt_Del"
to save a file... things you can eventually do, in DOS. Use the Tab key to
navigate through controls, or use the mouse, and use Esc to "cancel" stuff
(once to undo the actual control, twice in succession to undo the whole
form). There are just things that a standard Windows user expect, like F1 to
display the help file, F5 to refresh. Learning those is not just for one
program, but for most Windows programs. To close the form having the focus,
use Ctrl_F4. No programming required, and once you know it, again, it is
good in all Windows program (that behave like a Windows program). I think
you can easily convince your users that uniformity is worth the little extra
time it take to learn it... Note that you can use the mouse rather than
remembering the keyboard shortcut, if your users prefer...

I doubt all the keys can be captured through AutoKey macro.

The advantage of a visual environment should be that the interaction is
visually evident. If you need to print something, do not impose a key
combination only, add a button with the picture of a printer over it! You
minimize the training required to use a new application, when there is
visual evidence... take advantage of being graphical!



Vanderghast, Access MVP
 
Well, most of the keys can be captured, but further to your problem you can
re-define how keys behave on a form bases.

For example, I converted a fairly large application that was "green screen"
(character based) into a ms-access program. One of the features of that
system was that the ESC key backed out of a current screen, or menu/form.
That means that the ESC key would actually save the current record, and then
exit. I kind of like that feature, and I kept it for the ms-access program I
made also.

So, it was no problem at all to change ms-access to work this way also.

So, in most cases, sung VBA code was my preference. I actually have lot key
handling routines for continues forms anyway (I want the up/down arrow keys
to behave like a spread sheet, so, I use code to change that feature when
using grids in ms-access. Of course a grid is really a continues from. Here
is some examples of what I mean:

http://www.attcanada.net/~kallal.msn/Articles/Grid.htm


It really depends on what key(s) you want to re-map. I mean, likely, about
the only key you have to change is the ESC key. Tab and the Enter key pretty
well move to the next field, and I found users had no trouble with that.
(but, you could/can change the tab key if you wish, but I don't recommend
it.

I would consider making a standard key hand routine that you use for each
form. A few special keys can be re-defined using the Auto keys macro, but I
did not need it. Note that you are not talking about a whole bunch of
Macros, but only ONE macro. For some special things, then yes, using the ONE
AutoKeys Macro is ok. However, for most forms, using VBA code to re-define,
or change the behaviour of the keys is the way to go. It worked very well
for me.

By the way, the notes and some of the problems I encountered with this
"legacy" green screen conversion are outlined at the following.

http://www.attcanada.net/~kallal.msn/Articles/fog0000000003.html

You will find the above a interesting read, and it should give you some
ideas on how your conversion should be approached.
 
Back
Top