Description
You can use the SendKeys action to send keystrokes directly to Microsoft Access or to an active Windows-based application.
Setting
The SendKeys action has the following arguments.
Action argument | Description |
Keystrokes | The keystrokes you want Microsoft Access or the application to process. Enter the keystrokes in the Keystrokes box in the Action Arguments section of the Macro window. You can type up to 255 characters. This is a required argument. |
Wait | Specifies whether the macro should pause until the keystrokes have been processed. Click Yes (to pause) or No (not to pause). The default is No. |
Remarks Microsoft Access processes the keystrokes it receives through the SendKeys action exactly as if you had typed them directly in a Microsoft Access window.
To specify the keystrokes, use the same syntax as the SendKeys statement. Note An error can occur if the Keystrokes argument contains incorrect syntax, misspelled text, or other values that aren't appropriate for the window the keystrokes are sent to. You can use this action to enter information in a dialog box, particularly if you don't want to interrupt the macro to respond manually to the dialog box. Some Microsoft Access actions, such as PrintOut and FindRecord, automatically select the options in certain frequently used dialog boxes. You can use the SendKeys action to select the options in less commonly used dialog boxes. NotesSee Also GoToControl action, KeyDown, KeyUp events, KeyPress event, PrintOut action, SelectObject action, SendKeys statement, SetValue action.