By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,551 Members | 2,727 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,551 IT Pros & Developers. It's quick & easy.

Error in form_open , doesn't allow .mdb to be opened, solution needed for opening VBE

P: 26
Working on VBA access

By mistake I have inserted a msgbox in the Form_open event of my code(xyz.mdb) in frmMain.

Now when I try to open it , i get error message number 13 , Type mismatch error , Source: Form_frmMain.Form_Open .And if i click on Ok or Cancel, access closes.

I want to open the VB editor to remove that erroneous code.How can I do that?This error simpy closes access.
May 7 '10 #1
Share this Question
Share on Google+
3 Replies

Expert 2.5K+
P: 3,532
It sounds as if you have frmMain set to load when you open up the database, so you need to bypass this in order to get into the code module for the form.

This is done by pressing and holding down the <Shift> key, then clikcing on the database file to open it. Continue holding gown the <Shift> key until the database opens, leaving you at the Objects window.

You should now be able to go into the code module and make your changes.

Welcome to Bytes!

Linq ;0)>
May 7 '10 #2

P: 26
Thanks missinglinq...I have found that, but still, really appreciate your prompt reply .. :)
May 10 '10 #3

P: 3
Unless someone has disabled the bypass key and not put the code for re-enabling it as the very first code run (wasn't my code just had to fix it!). In that case you'll need to create a second db through which you can re-enable the bypass key and proceed as previously mentioned :-)
May 4 '13 #4

Post your reply

Sign in to post your reply or Sign up for a free account.