Textbox #Error in a form coming from a Query that has not run yet.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • IStogias
    New Member
    • Aug 2024
    • 1

    Textbox #Error in a form coming from a Query that has not run yet.

    Hi All

    Relatively new to Access.
    I have a DLook up textbox getting a value from a query.
    When i am running the query, textbox works fine and returns/display the exact values i am after.
    But upon opening the form, I am getting #Error on the textbox until I run the query.

    Is there a way when I open the form to dismiss this #Error showing in the textbox?
  • noahwill
    • Oct 2025
    • 0

    #2
    You’re seeing that error because the form is trying to display the DLookup value before the query it depends on has actually run. One easy workaround is to add an Nz() or IIf(IsError()) wrapper around your DLookup, so Access shows something blank or default instead of the error.
    slope

    Comment

    Working...