D
Derek Boutang
I'm converting some dev utilities from 97 to 2003 and
struggling with the new coding environment. Is the
following behaviour a bug, or am I not coding this
correctly?
According to the help, the following code is supposed to
load the names of open modules into an array:
intCount = Modules.Count - 1
For intCounter = 0 To intCount
aObjects(intCounter) = Modules(intCounter).Name
Debug.Print aObjects(intCounter)
Next intCounter
Instead, it loads every module in my database PLUS every
module in every library database reference.
But, when I attempt to reference a module in one of the
libraries using the following syntax, Access produces
Error 9: Subscript out of range:
?Modules("name").Name
To me, this looks like Modules(index) and Modules("name")
return different lists. Further, it looks like
Modules.Count is now a meaningless construct because it
doesn't really tell you how many modules are open, just
how many are available to be referenced within the
database.
Thoughts? Comments?
struggling with the new coding environment. Is the
following behaviour a bug, or am I not coding this
correctly?
According to the help, the following code is supposed to
load the names of open modules into an array:
intCount = Modules.Count - 1
For intCounter = 0 To intCount
aObjects(intCounter) = Modules(intCounter).Name
Debug.Print aObjects(intCounter)
Next intCounter
Instead, it loads every module in my database PLUS every
module in every library database reference.
But, when I attempt to reference a module in one of the
libraries using the following syntax, Access produces
Error 9: Subscript out of range:
?Modules("name").Name
To me, this looks like Modules(index) and Modules("name")
return different lists. Further, it looks like
Modules.Count is now a meaningless construct because it
doesn't really tell you how many modules are open, just
how many are available to be referenced within the
database.
Thoughts? Comments?