Í
ͯÏþÓñ
Douglas J. Steele said:Not only that, but the fact that no error is raised by the code being in
the AfterUpdate event implies that Access has not been set to require
declaration of all variables, since there is no Cancel variable declared
in the AfterUpdate event (only in the BeforeUpdate event)
VBA should ALWAYS be set up to require declaration (for the life of me, I
can't understand why it's not the default!) Ensure that each module has
the line Option Explicit at the top (either the first or second line). To
have that line automatically added to all future modules, go into Tools |
Options while in the VB Editor, look on the Editor tab and ensure that the
"Require Variable Declaration" option is selected.