Running a simple Macro, series of key storkes

chablups

Registered User.
Local time
Today, 09:07
Joined
Feb 2, 2002
Messages
88
I want to run a simple macro. Like a series of key strokes. Such as, Go to a specified control, enter a number or other character, save, and close. I want to assign a key to the macro like ALT-P, so that when I hit ALT-P the series of keystrokes in the macro will run. I have searched HELP in the Sendkey category and Keypress, and Macro, but I can't seem to get started in the right direction. Everything that is explained seems so much more complicated than what I want to do. Could someone point me in the right direction. (And yes, I've searched the archives here too, but with no luck.) Thanks.
 
Found this the VB help under autokeys. Hope it helps,
Dave

Assign an action or set of actions to a key
You can assign an action or set of actions to a specific key or key combination by creating an AutoKeys macro group. When you press the key or key combination, Microsoft Access carries out the action.

In the Database window, click Macros under Objects.


Click New.


Click Macro Names on the toolbar.


In the Macro Name column, type the key or key combination to which you want to assign the action or set of actions.
For information about the key combinations you can use to make key assignments, click .

Add the action or set of actions you want the key or key combination to carry out. For example, you could add a RunMacro action that runs the Print Current Record macro when CTRL+P is pressed.


Repeat steps 4 and 5 for any other key assignments you want to make.


Save the macro group with the name AutoKeys.
The new key assignments are in effect as soon as you save the macro group and each time you open the database.

Note If you assign a set of actions to a key combination that is already being used by Access (for example, CTRL+C is the key combination for Copy), the actions you assign this key combination replace the Access key assignment.

------------------------------------------

I did this once, make sure your macro is called Autokeys.

Now I have buttons that do all sorts of things! Remember if you have a button and put the & symbol before a particular letter in the caption on the button it will become an Alt shortcut to that buttons events.

HTH

[This message has been edited by Oldsoftboss (edited 02-14-2002).]
 
Thanks Oldsoftboss. I have that exact same help page already printed out, sitting next to my keyboard. I have been working on it for hours but can't seem to get it right. But now that I know that that is for sure the correct place to be finding answers, I will give it another go and let you know how it turns out.
 
Okay. Made progress. What I wasn't doing was saving as AutoKeys. So, I know how to assign a key or button to one of the selections in the dropdown menu. But I am still stuck on creating a macro of a series of keystrokes. What I have tried is first making a new macro with the keystrokes I want, by using SendKeys as the action, but then when I get to the Argument it says use the Visual Basic SendKeys syntax to specify these keys. I want a series of keystrokes. On my old DOS program I had been using, you just hit the exact keystrokes you wanted and the macro remembered it. But here it seems like you need to use some kind of esoteric code. If that is the case where do I find such a code, for instance for the letters of the alphabet or numbers. Somehow I think I'm on the wrong track here. Help.
 
Don't want to put a damper on your enthusiasm but send keys/auto keys are not consistent or reliable in Access.
 
So that means sending a series of keystrokes in a macro is not really something that can reliably be done? So don't spend a lot of time on it, because even if you do it right it won't consistantly work the same? Is that what you're saying Rich? (Enthusiasm is ebbing to the point that my wife has called me dull or was that Null?, as in Is Not Null and is Null).
 

Users who are viewing this thread

Back
Top Bottom