• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

8. The Visual Basic Editor, Part I > 8.4. The Immediate Window

The Immediate Window

The Immediate window (see Figure 8-1) has two main functions. First, we can send output to this window using the command Debug.Print. For instance, the code shown in Figure 8-5 produces the result shown in the Immediate window (there were four records in the recordset when I executed this code). (We will see how to execute the code in a procedure shortly.) This provides a nice way to experiment with different code snippets.

The other main function of the Immediate window is to execute commands. We can enter a line of code directly in the Immediate window. Hitting the Enter key at the end of the line asks Access to execute that line of code. Note that this only works for single physical lines of code, but you can place more than one logical line of code on the same physical line by separating the logical lines with colons, as in:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint