J
Jay Chan
I am trying to compile my MS-Access MDB program. But I got this error
message:
"User-defined type not defined"
Unfortunately, I cannot see which part of the source code that the
error message is referring to. Therefore, I don't know which data-type
it is complaining about.
Let me explain how I got to this:
- In order to fix the "Startup Module Keep Failed to Startup"
problem, I want to recompile all the programs in the MDB file.
- When the first time I compiled it, I got the error message
"User-defined type not defined", and I saw that MS-Access had
highlighted the statement referring to CurrentDb object. CurrentDb is
old DAO stuff, and I haven't added references to DAO stuff (and I
don't plan to do so). That explains the reason why I got that error
message. Fine. I rewrote that part of the program to use
Application.CurrentProject instead of CurrentDb (no big deal - just 10
lines of code).
- When I try to compile again, I got the same error message. But
this time MS-Access doesn't highlight anything in my code. Therefore,
I don't know which part of the program is causing that error message.
- Adding a reference to either "Microsoft DAO 2.5/3.51 Compatibility
Library" or "Microsoft DAO 3.6 Object Library" doesn't fix the
problem. I still get the same error message.
- Re-starting MS-Access doesn't fix the problem.
- The problem has nothing to do with whichever form that I happen to
have opened in VBA screen.
- Removing and re-inserting the code-module that used to use
CurrentDb doesn't fix the problem either.
- Eye-balling all the code modules doesn't find any statement that
is being highlighted.
How can I get rid of that error message?
Pleas help. Thanks.
Jay Chan
message:
"User-defined type not defined"
Unfortunately, I cannot see which part of the source code that the
error message is referring to. Therefore, I don't know which data-type
it is complaining about.
Let me explain how I got to this:
- In order to fix the "Startup Module Keep Failed to Startup"
problem, I want to recompile all the programs in the MDB file.
- When the first time I compiled it, I got the error message
"User-defined type not defined", and I saw that MS-Access had
highlighted the statement referring to CurrentDb object. CurrentDb is
old DAO stuff, and I haven't added references to DAO stuff (and I
don't plan to do so). That explains the reason why I got that error
message. Fine. I rewrote that part of the program to use
Application.CurrentProject instead of CurrentDb (no big deal - just 10
lines of code).
- When I try to compile again, I got the same error message. But
this time MS-Access doesn't highlight anything in my code. Therefore,
I don't know which part of the program is causing that error message.
- Adding a reference to either "Microsoft DAO 2.5/3.51 Compatibility
Library" or "Microsoft DAO 3.6 Object Library" doesn't fix the
problem. I still get the same error message.
- Re-starting MS-Access doesn't fix the problem.
- The problem has nothing to do with whichever form that I happen to
have opened in VBA screen.
- Removing and re-inserting the code-module that used to use
CurrentDb doesn't fix the problem either.
- Eye-balling all the code modules doesn't find any statement that
is being highlighted.
How can I get rid of that error message?
Pleas help. Thanks.
Jay Chan