Reference problems 97-2000

  • Thread starter Thread starter BobG
  • Start date Start date
B

BobG

I recently converted a large Access 97 .mdb to Access 2000.
I got "Errors on Compile" during conversion, so when the app finally came
up, I went to a module and compiled the code.
The first problem I ran into was that a Refresh causes a "Sub or Function
Not Defined."
I have no references that indicate "Missing."

I have built several apps in 2000, and have no trouble with them.

*Do I need some other references for a "coverted" mdb as opposed to one
built in 2000?*

My refs are:
Visual Basic for Applications
Microsoft Access 9.0 Object Library
Microsoft DAO 3.6 ject Library
OLE Automation
Microsoft ActiveX Data Objects 2.1 Library

I checked out Allen Browne's excellent reference guide, and MS's 2000
reference guide. Seems like I've got what I should have.

Thanks for any help,
BobG
 
Have you tried to compile your application? (under the Debug menu in the VB
Editor). That should highlight the specific function about which it's
complaining.
 
Did you check to make sure the app compiles in 97 before trying to convert it
to 2000?

Dorian
 
Doug,
When I compile, the compiler stops on any "Refresh" command I have in the
code.
The app, in 97, has been running for some years.
BobG
 
mscertified,
Yes, it has run successfully in Access 97 for years.
The 2000 compiler stops on any Refresh command it encounters in the module
code.
Bob G
 
Folks,
I found the problem. MSCertified got me thinking. The 97 application ran
fine, but did it really compile?

It wasn't the Refresh command that was causing the compile error, it was the
fact that the code was "orphaned." For example some code for a field that
was removed from a form or report, but the code left behind. I even found a
orphaned Refresh on a report. I had probably copied the sub form to create
a sub report.

Evidently, Access 97 didn't seem to mind these orphans, but 2000 does.
Also, the fact that 97 only seems to compile the module your viewing may
have contributed to "hiding" these problems. It seems that in 2000 and
2003, if you compile one module, you compile them all.

Should have known, because I had run into this in a 97 to 2003 conversion.
Once I remmed my way past the first few Refresh failures, I started to come
up with errors that were not a "reference" issue.

Well, I should be OK now. Thanks all for your help.
BobG
 
Back
Top