ACCDE - "Requested type library or wizard is not a VBA project"

Geirr

Registered User.
Local time
Today, 06:25
Joined
Apr 13, 2012
Messages
70
Hi All.

As the thread title says, after compiled to a accde file, I'm getting this error on certain tabs in the navigation pane.

Background:
Using a Navigation pane system (left and top tabs).
On three of the Top Panes tab for opening certain forms, when clicked - I get this error. Immediately - before any target forms open.
Non of the tabs have have any code in events, only the form name to be opened in the Data -> Navigation Target Name.
One of the three forms have an On Load event, the two others have not (in the meaning of code in On Load, On Open, On Click, On Activate, On Got Focus etc)

What I have done:
Compiled the VBA until no errors, including C & R after each error (found five errors), still no success
Checked all References in tools, none where marked 'missing' or other errors.
Created a new blank accdb and imported all object and re-established all modules in references, still no success...

I'm aware of the July 2022 bug, but I expect this have been solved, and the company I'm working in is very 'on top' of system and programs to be updated.
And I've seen that one solution could be to move all code behind the form to standard modules, call the by name from form event property - I really hope to avoid that because one of the form with this problem are loaded with controls and code behind them...

I've tried to search around to find other reasons for why this error occur and solutions, with no luck (except for the solutions mentioned above). Is there anyone here who have found any reasons for this behavior and workarounds?

I would gladly share my program for you to check, but it's connected to an sql server backend with restricted access (the reason for accde...), so that is difficult to do.

Best regards,
Geirr.
 
I haven't even compiled an .accde yet. But:
There must be on-click events/ macro's behind the main form to open the child forms? I'd look there first in code/ macro trying to reference a badly ref'd variable.

What I have done:
Compiled the VBA until no errors, including C & R after each error (found five errors), still no success
Checked all References in tools, none where marked 'missing' or other errors.
Created a new blank accdb and imported all object and re-established all modules in references, still no success...
1 - Silly question here from me - with below settings right to flag any probs in all modules/ classes.
Code:
Option Compare Database
Option Explicit
2 - References - Good, this sounds where it's at, or you have a badly named var declaration in code would be my first guess.
 
I haven't even compiled an .accde yet. But:
There must be on-click events/ macro's behind the main form to open the child forms? I'd look there first in code/ macro trying to reference a badly ref'd variable.


1 - Silly question here from me - with below settings right to flag any probs in all modules/ classes.
Code:
Option Compare Database
Option Explicit
2 - References - Good, this sounds where it's at, or you have a badly named var declaration in code would be my first guess.
2: Badly named var's are checked with the compile in Tools, VBA Editor, and yes, all forms starts with the Options... set.
The references I'm referring to is the references you set in Tools->References like Microsoft Outlook 16.0 Object Library etc.
 
What version are you running?

Possible workaround?

Another one posted at @theDBguy's site. (last post)
 
Last edited:
The references I'm referring to is the references you set in Tools->References like Microsoft Outlook 16.0 Object Library etc.
Thanks yes I'm aware. So if your variables are perfectly declared, inc'd all object vars, classes, types... then this is the next place I would look.
Have you designed & built on a different machine. Then you've gone to a different computer & tried to run the .accde. Where the references (to that computer referencing different library references...) are not necessarily set in the references... This is obviously something you will have to do when deploying the .accde.

Also try decompiling your project.
 
if you want to share the db so we can see what is the problem, you can convert your linked table to local table by right-clicking on them, and
selecting "Convert To Local Table".
 
Gasman: Thank you, I've tried these solutions and we all are using latest release of ms off enterpr.
dalski: I've done everything on the same computer, Tested on another computer with same errors on both. Btw, the selected refs are following the program, at least I've checked that the same references are present on both. I've also tried decompile - I forgot to mention this in my initial post...
arnelgp: I really would, but it's more than 50 tables and they are not linked, but referred via connection string...
 
Btw, the selected refs are following the program, at least I've checked that the same references are present on both.
I could be wrong in saying that you're experiencing a lucky coincidence here as you're likely testing in same office company with equipment purchased on roughly same date. If you are not linking to many libraries then with good luck you won't have many errors trying to reference non-mapped Libraries (of course this is pure luck & bad practice).

I believe the only way you can ensure your user will have the same references is if you check via VBA/ an installer when deploying the application.

arnelgp: I really would, but it's more than 50 tables and they are not linked, but referred via connection string...
Arnel has advised on how to embed the table objects into a local instance of MS Access :geek: from your linked BE.
 
I could be wrong in saying that you're experiencing a lucky coincidence here as you're likely testing in same office company with equipment purchased on roughly same date. If you are not linking to many libraries then with good luck you won't have many errors trying to reference non-mapped Libraries (of course this is pure luck & bad practice).

I believe the only way you can ensure your user will have the same references is if you check via VBA/ an installer when deploying the application.


Arnel has advised on how to embed the table objects into a local instance of MS Access :geek: from your linked BE.
As I wrote to Arnel, it's not linked tables, it's referred to the BE via connection string. So I would have to link the BE, and then embed the tables, and then I have to recode all references to tables due to different connection type - i suppose - correct me if I'm wrong here...
 
I don't think you're getting it @Geirr:

1768231465381.png


EDIT - apologies @Geirr, I see what you're saying; maybe something like below & edit all occurences via Ctrl-H... It is agg; I get what you're saying.

 
Last edited:
I don't think you're getting it
No probs - I do understand what you are writing. But the challenge is that the program app needs to connect to the backend with connection string, not linked tables. This because with linked tables from the server, it's impossible to be sure that no-one can get data they shouldn't. One example, one of the tables are holding all info on a user. Via the app, name and phone number are available for all. Rest of user data is hided/filtered.
But, it's easy for a user to make a empty database and import form the accde file, and then all the date is fully open. Note that all tables - also linked tables to BE is fully open to be imported from the accde. Same for queries. That's why I have rewrite the whole app to use connection string. (yes, I have local tables in the app, but they will hold only temporary data with no restrictions).
So the main reason for me to find a solution without having to import the tables from server to local tables, is because this is not how the app should work - i need to get solution on the actual use of the program.
Also, one of the three forms (or menu tab if you like) which create the mentioned error, does not have any connection tables at all...

And, just for an little add-on - I believed I did see a small difference when running a secondary decompile. So I ran it again, only to se that an another Tab - which have worked perfectly earlier - started to give me the same error message...
 
That's good you saw a change & I'd think this is indicating moreso where the issue is. Maybe try Ctrl-H & manually going through each var individually. That's helped me before with Option Explicit not checking every single var. The problem will be in the FE. As you can see I've had it before & decompiling fixed it for me.
Next I would double-check references. Then go through removing modules... as much as you can & go stage by stage by breaking-down applicably relevant areas of the application to isolate problem.

You could loop through all objects & remap in VBA... to new object location (Access) but it's certainly work you can do without. Colin has some work done in this area as linked.
 
Last edited:
Hi. Not familiar with the bug you mentioned, but I had an old article on my blog about the same error message. Not sure if it will help but just wondering if you saw it. If not, I could post a link to it, in case you’re interested.
 
Cool, thanks!
Thanks anyway - I've read your post from earlier. I will try to put the code in the form into a standard module instead of macros which i also suggested as an solution, and will see if that 'curer' the issue. But also using macros could be of interest.
 
Thanks anyway - I've read your post from earlier. I will try to put the code in the form into a standard module instead of macros which i also suggested as an solution, and will see if that 'curer' the issue. But also using macros could be of interest.
Good luck. Please let us know how it goes.
 
This error:

ACCDE - "Requested type library or wizard is not a VBA project"​

raised to me when using an ACCDE library on an ACCDE main database . Is that your case? Do you use any MS Access library?
 
This error:

ACCDE - "Requested type library or wizard is not a VBA project"​

raised to me when using an ACCDE library on an ACCDE main database . Is that your case? Do you use any MS Access library?

Thank you for input, but believe I've found at least one of the reasons why I got this error.

The main form, holding the navigation menu tabs cannot have any code behind it (that is - all form events must be clean). So I deleted and moved out all code there and selected the No on the Form -> Property -> Other -> Has Module, and the errors where gone (so far).
Found this hint deep in ms office copilot... :)
 
I found that mentioned in the google links I found, but discounted that, as I thought you would need the code.
Another black mark against Navigation forms then? :)

Just went back to look for it and it was @theDBguy's link.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom