Previous Page
Next Page

Hack 73. Write Code Faster by Turning Off Syntax-Checking

Make sure Access doesn't pester you with warning messages while you're writing code.

If you're like me, sometimes your fingers can't keep up with your brain. Often, when I am writing code, I am several lines ahead in my thoughts, and I'm typing as fast as I can to keep up. The last thing I want is to lose my train of thought, but if I make a few typing errors or leave out a keyword or variable, Access pops up a scolding message.

The error message in Figure 8-2 is a perfect example. I am in the midst of coding a Select Case statement. I don't know what the expression is yet, but I do have in mind what the actual cases are, and I want to get them down fast. But no, Access hangs me up on the Select Case line.

I know I left something out! I did this on purpose, and I will return and enter it in a little while! This interruption is just annoying.

So, I have learned to turn off these annoying messages as I enter lengthy chunks of code. Figure 8-3 shows the Options dialog. In the VB editor, use Tools Options to display the dialog box.

On the Editor tab of the dialog, uncheck the Auto Syntax Check checkbox. Doing so is the key to fast coding. When you turn off the syntax check, you can type without interruption. Errors will still be flagged by their color coding (lines with errors will change color), but no more pesky message boxes will appear that you have to clear.

Figure 8-2. A pesky warning message


Figure 8-3. Turning off Auto Syntax Check


Of course, it's a good idea to turn syntax-checking back on when you finish entering code!

    Previous Page
    Next Page