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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • titli
    New Member
    • May 2010
    • 26

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

    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.Fo rm_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.
  • missinglinq
    Recognized Expert Specialist
    • Nov 2006
    • 3533

    #2
    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)>

    Comment

    • titli
      New Member
      • May 2010
      • 26

      #3
      Originally posted by missinglinq
      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)>
      Thanks missinglinq...I have found that, but still, really appreciate your prompt reply .. :)

      Comment

      • d0wns3t
        New Member
        • May 2013
        • 3

        #4
        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 :-)
        Last edited by d0wns3t; May 4 '13, 05:31 AM. Reason: Autocorrect Typo (posting from phone)

        Comment

        Working...