How do I resolve a compile error that I get after conversion?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

After converting a database from Access97 to Access2000-2003, I get a compile
error of "Method or Data member not found" when I use a particular button on
a form. Can anyone help me?
 
Open any code window, and go to References on the Tools menu.

Check the box beside:
Microsoft Access DAO 3.6 Library
Uncheck any others you do not need.
You do need the Access and VBA libraries.

More info on references:
http://allenbrowne.com/ser-38.html

If that does not solve the problem, please post a followup to this thread.
 
I have only the Access, VBA Libraries and Microsoft Access DAO 3.6 Library
Checked and I still get the same error.
 
Do any of the checked references have "MISSING:" in front of them?

If not, what's the code that's failing on the compile?
 
No. The error still reads "Method or Data Member not found" with a different
subject line highlighted then before. As far as code, I'm not sure what you
mean. Please help!
 
You're saying you're getting a compile error. That implies that you're
compiling your code (under the Debug menu when you're in the VB Editor), and
that some particular line of code is being highlighted when the error is
raised.

Perhaps you meant you're getting a runtime error....

In any case, you say that the error only occurs when you use a particular
button on a form. What's the code associated with that button?
 
I've got it! It was the library. I needed the "Microsoft DAO 2.5/3.5
Compatability Library" instead of the "Microsoft DAO 3.6 Object Library". I
don't really know why but it worked. Thanks for all the help. I'm sure I'll
be back for more answers sometime in the future.
 
Padcoor, it would be good track down what the issue was here.

The 2.5/3.5 compatibility library was designed to help Access 97 understand
databases created in Access 2. I don't think this works well with Access
2000 or later.
 
This was originally a Access 97 database converted into a 2002-2003 Access
database. Somewhere between the conversion the loss of recognizing code was
the issue when a form create button was activated on the main switchboard. I
don't really know why this works but for now it is. Do you recommend
anything else that might work that is more suitable to Access 2002-2003?
 
Did you try compiling the application with the reference set to DAO 3.6? Did
it identify any specific lines of code that were in error? If so, post the
routine that the code's in, and identify the specific line that was was
highlighted.
 
Back
Top