When starting an Access Database design I always like to set the following options which can be found in the code module section in the tools / options toolbar.
- Tick the ‘Require Variable Declaration’ tick box, as this removes issues where data can be assigned to a miss spelt variable – many years ago I was told, and I don’t know if it was true,’ that if approaching Microsoft with a problem, one of the first questions they always asked was ‘ do you have require variable declaration set to true? If not go away and add ‘Option Explicit’ to all the modules and then come back if you still can’t find the problem.
- Untick ‘Auto Syntax Check’! This is not as strange as it sounds as all it does is simply stop a message box appearing when you make an error, the incorrect logic is still coloured red (unless you have personalised the colour settings). But you don’t have to click a message box before you can continue.
- Finally, I like to untick the ‘Default to Full Module View’ as I like to go straight to the bit of code I want to deal with, without trying to see where the cursor has jumped to. You can always toggle between Full Module & procedure by clicking the small buttons on the bottom left hand side of the screen.