Code break

G

Guest

Hello,
When writing code the error message keeps poping up
saying that the code is incorrect. I know that since it
isn't finished as yet. Is there a way to turn off that
message while I am building the code? Thanks

David
 
S

Steve

It depends on which version you are using.

Access 97:
Go to the Tools > Options > Module menu and uncheck Auto
Syntax Check.

Access 2000:
Go into the Visual basic editor then Tools > Options and
uncheck Auto Syntax check.

Good Luck!
 
M

Marshall Barton

When writing code the error message keeps poping up
saying that the code is incorrect. I know that since it
isn't finished as yet. Is there a way to turn off that
message while I am building the code?


In the VBE window, use the menu item Tools - Options -
Editor - Auto Syntax Check
 
K

Kevin K. Sullivan

David,

This is often a symptom of having an open form with a timer event running
while you are writing code in the VBE. When the event fires, the VBE window
loses the focus and the syntax is checked immediately instead of when you
finish writing a line of code.

If you want to keep syntax checking on, but not run it every second or
millisecond, ;-), try copying this line:

For i = 0 to Forms.Count - 1: Debug.Print Forms(i).Name,
Forms(i).TimerInterval: Next i

Make sure it all on one line and copy it to the clipboard. In Access, press
Ctrl-G to bring up the Immediate Window and Ctrl-V to paste the code. Press
Enter and the open forms will be listed with their TimerInterval settings.
This code also lists forms currently open in design mode; they are not the
culprits. To stop the syntax checking, either close the open form, set its
TimerInterval Property to 0, or open it in Design Mode.

HTH,
Been there,

Kevin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top