Forum Discussion

Num's avatar
Num
Copper Contributor
Aug 29, 2025

VBA

Hello everyone, I'm new here, so please be kind!

This happens every time I create a new file, and Visual Basic Editor won't open in Access. When I click on 'Visual Basic', a pop-up box appears and I'm told that the database cannot be opened because the VBA project contained in it cannot be read. The database can be opened only if the VBA project is first deleted. Deleting the VBA project removes all codes from modules, forms and reports. You should backup your database before attempting to delete the VBA project. Note: To create a backup copy, click Cancel and then make a backup copy of your database. To open the database and delete the VBA project without creating a backup copy, click OK.

Well, I have no database to read in the first place because I haven't made one, so what does it mean, and how do I fix this, please?

4 Replies

  • That error should not happen when you make a brand new database. If you are seeing it right away, it usually means there is something wrong with your Access installation, not the database itself. The first thing I would try is doing a repair of Office from the Control Panel. If that does not fix it, you might need to completely remove Office and reinstall it, since sometimes older versions or corrupted installs can leave things behind.

    Is this a brand new computer, or have you had Office on it for a while? Sometimes the history of installs makes a difference. I give my students a full troubleshooting checklist for problems like this, but in short the big steps are: repair, reinstall, and make sure you are up to date with the latest patches. If none of that works, then start looking deeper.

    Or just buy a new machine. LOL. JK.

    LLAP
    RR

  • George_Hepworth's avatar
    George_Hepworth
    Silver Contributor

    That error is usually the result of corruption in an accdb. You should not see it when trying to create a new database accdb.

     

    So, there is something definitely off in the process you are experiencing. Please explain how you go about creating a new file. Are you saying that you start Access, Select File and then New here?

     

    Or do you use a different method? Please be as specific as possible. Show us screenshots, if possible, along the way.




    • Num's avatar
      Num
      Copper Contributor

      I select New, from here and then get the pop-up message straight afterwards.

      Once I've cancelled or pressed OK, I can create these Fields with short text. However, as soon as I try to put numbers or Currency in the Field, I get the same Pop-up message.

       

      I am very new to Access, and I really don't know what to do. 

      • George_Hepworth's avatar
        George_Hepworth
        Silver Contributor

        Thank   you for the clarifying screenshots.

        The middle screenshot does suggest that you are trying to instantiate a template, rather than create a new accdb from scratch. That doesn't follow from the statement that you tried to create a new database, and the 3rd screenshot looks like it would be a newly created database. 

        There's something really wrong. That does indeed indicate a problem with your Access installation, as Richard said.

        Reinstall Access and see if that clears the problem.

Resources