By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,872 Members | 2,392 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,872 IT Pros & Developers. It's quick & easy.

A97 allows separate procedures in a form module to share common labels.

P: n/a
MLH
A97 allows separate procedures in a form module to share common
label names. Access 2.0 would puke when that happened. For instance,
if I had 2 procedures in an Access 2.0 form module with labels both
named ERR_MyButton_Click, compiling loaded modules produced
an error. I'm glad to see this is not the case in Access 97. Access
2.0 went so far as to disallow me from using the same line numbers
in two different procedures of a form module. If I numbered one of
them with 100, 110, 120 and 130. I would have to number the next
procedure's lines with 101, 111, 121, 131 or something else that
didn't conflict. That was a pain.

Anyone know of a setting in Access 2.0 that overcomes the problem?
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
MLH wrote:
A97 allows separate procedures in a form module to share common
label names. Access 2.0 would puke when that happened. For instance,
if I had 2 procedures in an Access 2.0 form module with labels both
named ERR_MyButton_Click, compiling loaded modules produced
an error. I'm glad to see this is not the case in Access 97. Access
2.0 went so far as to disallow me from using the same line numbers
in two different procedures of a form module. If I numbered one of
them with 100, 110, 120 and 130. I would have to number the next
procedure's lines with 101, 111, 121, 131 or something else that
didn't conflict. That was a pain.

Anyone know of a setting in Access 2.0 that overcomes the problem?


Stop using line numbers?

Access 97 overcomes these problems because the VBA for forms is stored
in a Class module, which has its own namespace. Access 2.0 doesn't
really do Class modules.

If you want to call a common VBA function from other forms, then factor
the function out into a separate module, and just have the event
handlers call it. You will want to have a good understanding of how the
"Me" reference shortcut works...
Nov 13 '05 #2

P: n/a
MLH
I was just curious really. It was a problem only with line numbers for
me in access 2.0.

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Stop using line numbers?

Access 97 overcomes these problems because the VBA for forms is stored
in a Class module, which has its own namespace. Access 2.0 doesn't
really do Class modules.

If you want to call a common VBA function from other forms, then factor
the function out into a separate module, and just have the event
handlers call it. You will want to have a good understanding of how the
"Me" reference shortcut works...


Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.