J
jfp
This has just happened again ... hence the repost. This really looks
like a corruption issue of some sort, and it is getting to be a
nuisance! Can anyone help ?
-=-=-=-=
This has happened to me a few times (obviously, at random)
In Module A (typically a simple code module) i have a function X with an
arg declared as ByRef (and perhaps other arguments as well)
In Module B (typically a form module) i call X.
Everything compiles and works.
I save copies of A and B (via "File / Export File" from the VBA IDE).
Then, i make various changes to B. None of these affect the call to X.
I make NO changes to A. Sooner or later, when i compile, i get an error
in B at the function call to X, stating that there is a "ByRef argument
mismatch".
To fix this, i delete ALL the code from A and reload it (via "Insert /
File" from the VBA IDE) from the saved copy. Again, everything compiles
and works.
This is scary. Any comments ?
Access 2002 (10.2627.3311)
NO Service Packs installed.
P.S. This last time, the arg in question was a DAO.RecordSet. I do not
remember if it has been this way the other times, but it may well have
been.
-=-=
This time: I saved a clean copy of the database (compiled, ran ok)
I made some changes to module B (as above). No changes to A.
Same error. I saved the database at this point also. Then, I deleted
module A and imported A from the saved database. Compilation is now ok.
Since I have saved the database that failed, i could send it for
examination if desired.
like a corruption issue of some sort, and it is getting to be a
nuisance! Can anyone help ?
-=-=-=-=
This has happened to me a few times (obviously, at random)
In Module A (typically a simple code module) i have a function X with an
arg declared as ByRef (and perhaps other arguments as well)
In Module B (typically a form module) i call X.
Everything compiles and works.
I save copies of A and B (via "File / Export File" from the VBA IDE).
Then, i make various changes to B. None of these affect the call to X.
I make NO changes to A. Sooner or later, when i compile, i get an error
in B at the function call to X, stating that there is a "ByRef argument
mismatch".
To fix this, i delete ALL the code from A and reload it (via "Insert /
File" from the VBA IDE) from the saved copy. Again, everything compiles
and works.
This is scary. Any comments ?
Access 2002 (10.2627.3311)
NO Service Packs installed.
P.S. This last time, the arg in question was a DAO.RecordSet. I do not
remember if it has been this way the other times, but it may well have
been.
-=-=
This time: I saved a clean copy of the database (compiled, ran ok)
I made some changes to module B (as above). No changes to A.
Same error. I saved the database at this point also. Then, I deleted
module A and imported A from the saved database. Compilation is now ok.
Since I have saved the database that failed, i could send it for
examination if desired.