How to Fix the “Form Name is Misspelled or doesn’t Exist” Error in Access?

You may encounter the “Form name is misspelled or refers to a form that doesn’t exist” error while running a VBA project in Microsoft Access. It appears with error code 2102. Several users have reported experiencing the error when accessing the forms via VBA in MS Access. It usually occurs when there is an issue with the forms in the code. However, there are various other reasons that can trigger this error. Let’s take a look at the reasons for this issue and the solutions to fix it.

Reasons for the “Form Name is Misspelled or does not Exist” Error

Following are some reasons why you get the form name is misspelled or does not exist error:

  • Missing references
  • Incorrect form display settings
  • Access database in which you have saved your project is corrupted or damaged
  • Incorrect form name or form does not exist
  • Database is not saved at the trusted location
  • Form is deleted

Methods to Fix the Error “Form Name is Misspelled or does not Exist” in MS Access

Here are some effective methods to resolve this issue.

Method 1: Check the Form Display Settings

Several users have confirmed that they’re able to fix the error by changing the default form display settings in Access. You can check and change the form settings using the below steps:

  • Open MS Access. Navigate to the File option and then click on the Options
    go to option
  • In Access Options, click on the Current Database
    Check Display Form

  • In the Display Form list under Application Options, choose the desired form (in which you are getting the error).
  • Click OK.

Now, close the database and then reopen it. If you’re still getting the error, follow the next methods.

Method 2: Check the Location of the Form

Sometimes, the error can occur if the Access fails to recognize the form in the macro. It can occur if you are using the incorrect location of the form. To check this, follow the below steps:

  • Go to the Navigation pane and then right-click on the form.
  • Click on Design View to open the form in Design View.
Select Design View
  • In Form Design Tools, go to File and then click Save As.
    Go To File On Design View Window
  • In the Save As dialog box, select the desired database and then check the location of the file.
  • If the location of the form is incorrect, change it and then check whether the error is fixed or not.

Method 3: Check Form Properties

Sometimes, incorrect form properties can trigger the “form name is misspelled or doesn’t exist” error in Access. It usually occurs if you set the record set property of the form incorrectly. You can check and correct the property of the form using the below steps:

  • Right-click on the desired form and click Layout View.
    Layout View Window
  • Select Form Properties.
    Select Form Properties

  • In Property Sheet window, check the Record Source.
    Property Sheet Window

  • If you have set the property incorrectly, then correct it. Then, check whether you are able to fix the error.

Method 4: Check the Macro Settings

The form name is misspelled or doesn’t exist error can also appear due to incorrect macro settings. Sometimes, the error can occur if you have set the macro settings to control the macros in the database file. You can check the macro settings using the below steps:

  • Open the Access database.
  • Navigate to the File tab and then click Options.
  • In Access Options, click on Trust Center and then click Trust Center Settings.
    Select Trust Center In Access Window
  • In the Trust Center wizard, select Macro Settings.
    Select Macro Settings
  • Select “Enable all macros (not recommended; potentially dangerous code can run)”.
  • Click OK.

Method 5: Move the Database to a Trusted Location

By default, Microsoft Access blocks the macros or code if the source is untrusted. The form does not exist error can occur if the macros have been blocked by the Access application. You can try moving the database file to a trusted location to fix the issue. Before proceeding, make sure you have known the trusted location of the database file. Here are the steps:

  • Open your Microsoft Access.
  • Go to the File tab and then choose Options.
  • In the Access Options dialog box, click Trust Center and then click Trust Center Settings.
    Add New Location In Trusted Settings
  • Note down the path of the Trusted location and then click Add new location to add a new trusted location.
    Ms Office Trusted Location Wizard
  • Enter the path of the location that you need to add.
  • Click OK.
  • After adding the trusted location, move the desired database to it.

Method 6: Check the Missing References

The error can occur if there are Missing References in the Access database. To check this, follow the below steps:

  • Open your Access database.
  • Press the Alt+F11 keys to open the Visual Basic Editor.
  • Click on the Tools menu and then click References.
  • Check the list of available references. If you see any missing references, select the checkbox next to the name of the library.
    Select References Window

Method 7: Repair the Corrupted Database

The Access error 2102 can also occur due to corruption in the database. You can try repairing the damaged database files using the built-in free Access utility, named Compact and Repair. Here’s how to fix corrupt database using this utility:

Note: Make sure that no other users have opened the database file.

  • Open Microsoft Access and double-click on Blank database.
  • Go to File and then click on the Close
  • Click on the option labeled Database Tools and then click Compact and Repair Database.
  • The Database to Compact From window opens. Go to the affected Access database file and then double-click on it.

The tool will create a copy of the repaired database file at the same location.

 The Compact and Repair utility may not be able to repair the severely damaged database. In such a case, you can try a third-party Access repair tool, such as Stellar Repair for Access. It can repair MDB/ACCDB files and restore macros. Also, the software allows you to preview the recoverable objects of the database before saving them. The Stellar Repair for Access tool is compatible with MS Access 2019, 2016, 2013, 2007, and earlier versions. You can try the free trial version of the software.

Conclusion

If you experience the “form name is misspelled or doesn’t exist error” in Access, follow the methods mentioned in this post. If the error occurs due to corruption in the database file, you can use the Compact and Repair tool to repair the file. If your database file is severely corrupted, then you can download Stellar Repair for Access. It can even repair password-protected database files with 100% integrity.



Was this article helpful?
About The Author
author image
Monika Dadool linkdin Icon

Monika Dadool is a Senior Content Writer at Stellar with over 5 years of experience in technical writing.

Table of Contents

WHY STELLAR® IS GLOBAL LEADER

Why Choose Stellar?
  • 0M+

    Customers

  • 0+

    Years of Excellence

  • 0+

    R&D Engineers

  • 0+

    Countries

  • 0+

    PARTNERS

  • 0+

    Awards Received