S
sebt
Watch out for this BUG in Access (2003)
I'm using a documentation tool called DocumentX (highly-recommended by
the way). It's a great product but doesn't pick up objects (forms,
reports) from your database unless they have a VBA module attached to
them.
So for documentation purposes I'm trying to give every form and report
a module. Loop through the Forms and Reports containers, and set
HasModule=True for those forms/reports that have this set to FAlse.
This doesn't work. If you then open up the form or report, its
HasModule property is set to True, but you can't access its module
(presumably because Access hasn't given it one).
You have to explicitly open each form/report in the UI, set HasModule
to True (or to False then back to True, if you previously set it using
VBA), cancelling the warning box when you set it to False, and then
open the VBA editor. Only then does Access actually create a module.
This is extremely annoying - I now have to do this for 35 forms and 68
reports. I wish that at least VBA would report "you cannot set the
HasModule property" - because, effectively, you can't set it! Trying
to set a type-Module variable to Form.Module after setting HasModule to
True gives a nasty error - because there is no Module.
I'm using a documentation tool called DocumentX (highly-recommended by
the way). It's a great product but doesn't pick up objects (forms,
reports) from your database unless they have a VBA module attached to
them.
So for documentation purposes I'm trying to give every form and report
a module. Loop through the Forms and Reports containers, and set
HasModule=True for those forms/reports that have this set to FAlse.
This doesn't work. If you then open up the form or report, its
HasModule property is set to True, but you can't access its module
(presumably because Access hasn't given it one).
You have to explicitly open each form/report in the UI, set HasModule
to True (or to False then back to True, if you previously set it using
VBA), cancelling the warning box when you set it to False, and then
open the VBA editor. Only then does Access actually create a module.
This is extremely annoying - I now have to do this for 35 forms and 68
reports. I wish that at least VBA would report "you cannot set the
HasModule property" - because, effectively, you can't set it! Trying
to set a type-Module variable to Form.Module after setting HasModule to
True gives a nasty error - because there is no Module.