From the course: Access: VBA

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Verify output using the Immediate window

Verify output using the Immediate window

From the course: Access: VBA

Start my 1-month free trial

Verify output using the Immediate window

- [Teacher] So far in this course I have verified most of my code's output using message boxes. Message boxes are fine, but they require that the user, probably you, click a button to dismiss them and continue running the program. If you prefer to bypass message boxes and still get feedback on your code, you can use the immediate window. The immediate window is a panel that appears at the bottom of the Visual Basic Editor. I'll demonstrate how to use the immediate window in this movie. I've opened the course database and I'll create a code module. So to switch to the Visual Basic Editor, I'll press Alt, F11. From here, I can go to the insert menu and click "module" to create a code module. I'll start by creating a subroutine that accepts a number as input and then adds three to it and displays the result. So do "Sub, Check, Error." (typing sound) So we're checking for an error in the code. And you'll see why that's important in a moment. Then I will declare "LNG number" as Long, and…

Contents