Option Explicit - Question

sondriven

Registered User.
Local time
Today, 14:18
Joined
Jun 13, 2002
Messages
158
Hello, I did an Anaylsis of the Performance of my database and for all the Forms the suggestion is to put Option Explicit in the first line in the code.

Ive only delved into code a couple times and could use some help on exactly how to enter the code into place. I did a search and it seems like this is a good option to have in the form. I also now have it so that the Option is automatically put into place.

Thanks
 
All of your modules should have there two lines at the top...

Option Compare Database
Option Explicit

Option Explicit is used at module level to force explicit declaration of all variables in that module. Use Option Explicit to avoid incorrectly typing the name of an existing variable or to avoid confusion in code where the scope of the variable is not clear.

HTH
 
There is only:

Option Compare Database

at the top. I just now defaulted the Option Explicit on Access 2000. But for the database I programmed prior only has the one option.

When Im in Visual, I cant seem to be able to enter in the line:

Option Explicit
 

Users who are viewing this thread

Back
Top Bottom