Share via

Microsoft Access database engine cannot find the input table or query '|'

Eberhart, Elizabeth 0 Reputation points
2025-12-12T18:50:01.93+00:00

I have a macro that is suddenly "broken". When I try to run it, I get a window that shows Error Number: 3018. And my only option is to "Stop All Macros".

When I close that window, I get this message: The Microsoft Database Access engine cannot find the table or query '|'. Make sure it exists and that its name is spelled correctly.

There is no table or query named '|'. How do I fix this?

Microsoft 365 and Office | Access | For business | Other
0 comments No comments

3 answers

Sort by: Most helpful
  1. Ken Sheridan 3,571 Reputation points
    2025-12-18T13:34:01.6933333+00:00

    When an object stops functioning as expected for no apparent reason the first thing I always do is to copy the object to the clipboard, and then paste it in under a new name. This almost always cures any corruption which the object has incurred. So, I'd try that first with your macro. If it still raises the error, then you need to look for a semantic error of one of the types described by George. If not, delete the original macro and rename the copy back to the original name.

    Was this answer helpful?

    2 people found this answer helpful.

  2. AI answer

    2025-12-12T18:50:16.5666667+00:00

    The error message you are encountering indicates that Microsoft Access cannot find a table or query that your macro is trying to reference. The placeholder character '|' suggests that there might be a syntax error or a missing reference in your macro.

    Here are steps you can take to troubleshoot and resolve this issue:

    1. Check for Missing Tables or Queries: Ensure that any tables or queries referenced in your macro actually exist in your database. If a table or query has been deleted or renamed, you will need to update your macro accordingly.
    2. Inspect the Macro Code: Look for any syntax errors or incorrect references in your macro code. Make sure that all names are spelled correctly and that they match the actual names of the tables or queries in your database.
    3. Use the Linked Table Manager: If your macro references linked tables, ensure that the links are still valid. If the source files have been moved or renamed, you will need to update the links using the Linked Table Manager.
    4. Recreate or Relink: If you find that a table or query is missing, you can either reimport it or relink it to restore the reference.

    By following these steps, you should be able to identify and fix the issue causing the error in your macro.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

    1 person found this answer helpful.
  3. George Hepworth 22,855 Reputation points Volunteer Moderator
    2025-12-13T04:15:08.9733333+00:00

    Help us by providing some details.

    Did this macro ever work? When you say it is "broken", does that mean it did work, but now doesn't work?

    Let's also be sure we are talking about the same thing. Macros and VBA are two different coding languages in Access. In other Office applications, the terms are used interchangeably for VBA code.

    Do you have a macro or is this VBA?

    The error message is pretty clear. Access is expecting something in your code (whether VBA or a Macro) to refer to a table or a query using a name that it doesn't find. So, we also need to confirm that this is not a case of a table or query being deleted or renamed.

    Also, let's consider the possibility that somehow the contents of the macro or VBA was edited.

    The more detail you can provide the better our chance of offering useful help will be.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.