I'm using the SendKeys action in a macro to send keystrokes to a dialog box, but they're not being sent.
Because the dialog box suspends the macro, you must put the SendKeys action before the action that causes the dialog box to open and set the Wait argument to No to avoid pauses in processing.
I want to temporarily disable an action in my macro.
This is similar to temporarily turning a line into a comment in Microsoft Visual Basic for Applications (Visual Basic for Applications (VBA): A macro-language version of Microsoft Visual Basic that is used to program Windows applications and is included with several Microsoft applications.) code by typing a single quotation mark (') at the beginning of the line.
The Where Condition argument in my macro's OpenForm or OpenReport action is producing unexpected results.
The Where Condition argument of an OpenForm or OpenReport action might produce unexpected results for any of the following reasons:
- The Where Condition expression uses invalid syntax to refer to the value of a control (control: A graphical user interface object, such as a text box, check box, scroll bar, or command button, that lets users control the program. You use controls to display data or choices, perform an action, or make the user interface easier to read.) or property.
- The Where Condition argument uses invalid syntax to combine the value of a field, control, or property with a literal string.
- The OpenForm or OpenReport action is being carried out by using the corresponding Microsoft Visual Basic for Applications (Visual Basic for Applications (VBA): A macro-language version of Microsoft Visual Basic that is used to program Windows applications and is included with several Microsoft applications.)
methods (method: A procedure similar to a statement or function that operates on specific objects. For example, you can apply the Print method to the Debug object to transfer printed output to the Immediate window.) in a procedure, and the Where Condition argument is specified in the wrong position in the list of arguments. If the Where Condition argument isn't preceded by View and Filter Name arguments, you must still type a comma as a placeholder for each of these arguments.
The RunCode action in my macro won't run a Microsoft Visual Basic module.
You use the RunCode action to run a Function procedure, not a module (module: A collection of declarations, statements, and procedures stored together as one named unit. There are two types of modules: standard modules and class modules.). In Microsoft Access, you run procedures rather than modules. Replace the name of the module with the name of the function in the module that you want to run. To run a Sub procedure (Sub procedure: A procedure that carries out an operation. Unlike a Function procedure, a Sub procedure doesn't return a value. You begin a Sub procedure with a Sub statement and end it with an End Sub statement.), call it in the function.
To open a module, use the OpenModule action.
When I run my macro, Access displays messages that I don't want to see.
You can hide warnings and other messages while a macro is running by carrying out the SetWarnings action in the macro. You can also use the SetWarnings action to display messages again.