VBA Module(s) not available to ACCDE file

ShredDude

Registered User.
Local time
Today, 15:21
Joined
Jan 1, 2009
Messages
71
I'm stumped.

I saved my ACCDB file as an ACCDE for another version of my app. Previous versions of ACCDE work fine. This time, anything that requires VBA does not work. It's like VBA modules are not there.

When in the ACCDB version of the file, everything works fine. In the ACCDE everything is visible, including the Code Modules, of course they can't be opened as it's an ACCDE file. Everything works, except things that need VBA.

For example, one form loads fine, but a portion of it doesn't get populated because it's reliant on VBA. Command buttons don't respond, etc.

I can't think of anything I've changed since the creation of the last ACCDE that could cause this.

Any ideas???

This is a first for me in my short experience with Access. Any insights much appreciated.

Thanks,

Shred
 
Hopefully you still have a copy of your ACCDB file. Check that you have no issues with your VBA references. If they are OK then try making a new ACCDE and check if that works.
 
EDIT:

I was wrong, I must've still been in the ACCDB file when I thought it was working earlier. It's still not working for me. I've removed any extraneous reference in the VBA Project.

Everything works fine in the ACCDB file.

Every time I re-save the ACCDE file and open it, I cannot successfully use forms or reports that rely on a query that contain references to VBA functions. For example a form will try to open, and pop up Error windows claiming and undefined reference to a VBA function. clicking OK allows the Form to process and open but then the form is only populated in the areas not reliant upon VBA. No command buttons work, or After Update events when selecting a value in a combo box on form etc. It's as if VBA is missing from the ACCDE file.

Very frustrating! I'm still sumped! Any more ideas???


Rabbie:

THANK YOU! I had been playing around with various ActiveX controls in Forms. I had deleted the draft Forms containing these various controls, but the reference to one of them, to which I don't have a license, remained checked in the VBA Project's references.

Perhaps this was preventing the overall VBA project from being executed? No warnings as such ever appeared. In Excel, I'm used to seeing Missing Reference errors if you don't have something checked...this is a first for me that I see no error when I have something checked and am not even referencing an object from that reference.

Thanks again for the tip, the ACCDE now works!


Coach:

Thanks for the thought. Adding the folder that the ACCDE file was in to my Trusted Locations was one of the steps I took last night while banging my head against the wall trying to figure this out. In so doing I learned that that then bypasses the Security warning on startup which was nice. As I don't have a digital signature for the file, I'll continue with that for my own ease of use.

Thanks again!
 
Last edited:
Update:

I found another post referring to a "quirk" with A2007 where you have to compile the VBA project immediately before crating the ACCDE. So, I did that, and it compiled successfully with no errors. I then recreated another ACCDE file.

This time upon opening the ACCDE file and trying to open a form that utilizes VBA in it's underlying Query I got the following error message:
"Unexpected Error (40230)". (Image attached)

After clicking OK multiple times, it finally allowed my form to open and everything works.

After closing the ACCDE file and reopening it, I can proceed to the form without that error popping up. Weird.

Anyone hit that one before?
 

Attachments

  • ScreenHunter_03 Jan. 15 12.07.jpg
    ScreenHunter_03 Jan. 15 12.07.jpg
    9 KB · Views: 855
ShredDUDE,

If I did not read your post, I would have gave up on my problem. We exactly have the same problem. I thoroughly read your post and did the same thing. Voila! It worked.

Thanks!!!
 
I split my 2007 db and the front end db accdb worked and I could save changes to records. I created an accde from the front end db and changes to records did not apply / get saved. I checked references and added a reference for ms vba extensibility 5.3, I compiled code before creating the accde. I also created an accde for the front and back end pr msn refeference:(). I'm continue to have the problem where when creating an accde of the front end database changes to the records I make are not saved.
 
Hi bxc,
I happened across an article earlier today where they mentioned that one should NOT make an ACCDE file of the BE. Only the FE should be converted.

I could be wrong, because I'm not the most experienced person here, but it's worth considering going back to the ACCDB back end. Anyone out there KNOW if this is correct?

Good luck.
 
Making the BE an .accde doesn't do anything for you so I don't do it. What I do do though is change the extension on the BE to something unusual such as .fle. I also give it a name that is unrelated to anything else in the application. This "hides" the file in plain sight. Access doesn't care what the extension is. To get this to work, you need to type the file name into the box. You won't be able to browse for it since the file dialog limits the files to the defined Access extensions. So just type - MyFileName.fle - and Access will accept it.
 

Users who are viewing this thread

Back
Top Bottom