General Q - Code and why it doesnt work all of the time

ahuvas

Registered User.
Local time
Today, 05:42
Joined
Sep 11, 2005
Messages
140
I am wondering why access does not follow its own code all of the time?

For example I have passworded forms following the tutorial on the Microsoft site. It mostly works when the participants fills in the wrong password we will get an error message box and when they cancel the password dialogue box it wont let the person enter the form - but not all the time. Sometimes if you press cancel it still opens the form anyway (without requiring the correct password).

This is similar with the module that I put in to prevent people from using the mousewheel to leave their record etc. Most times it works but sometimes it just isnt called on form load.

There is nothing wrong with any of these codes and when they work they work well but I cant seem to rely on access to do what is supposed to?
 
It sounds like there's an issue with trapping the relevant events rather than access being flaky about when and if it decides to do something.

If you've got your password routine set to let you pass unless you "get something wrong" and something else occurs outside of what you've defined as "something wrong" then you'll get into the area you are trying to protect.

Spend some time stepping through your code in the VBA window and trying to do things outside of what you think is normal behaviour and see what it does.

99% of everything Access does to my code that leaves me fuming is normally because I've done something not quite right.
 

Users who are viewing this thread

Back
Top Bottom