It can be easy to have unintended bugs or errors creep into complex macro statements. Using the single-step option in the run command slows the macro down and allows the database developer to read through each step as it moves through the routine. In this video, Access database expert Adam Wilbert shows how to use the single-step feature to identify a bug and see how conditional macros are processed.
- [Instructor] It's not very often you'll get a complex…macro constructed exactly right on the first try.…You're bound to get the occasional error and have…to go back and investigate what the problem might be.…In those cases, it'd be nice to slow the macro down…and verify each step that it moves through…to help isolate and identify any issues.…I've gone ahead and added an additional action…into the morning routine macro that we created…previously in the course.…Now, if I double-click on it to run it,…we're going to get this error message that says,…the command or action Zoom100% isn't available now.…I'll press the OK button,…and this Macro Single Step window opens up.…
It tells me that we have an error…here in the run macro command action.…The only option that we have is…to stop all macros from running,…and that leaves us halfway through the process…with just the Orders table opened up.…Let's go ahead and close this table down.…In order to troubleshoot this macro, I'm going to open it…up in design view by right-clicking on it,…
- Creating multi-step macros
- Triggering macros
- Running macros at startup
- Adjusting the execution and flow of macros
- Troubleshooting macros