Error #Name? when prompting a user for information when opening (running) a report

Posted on 2012-08-31
Last Modified: 2012-08-31
I have a report that needs to prompt the user for information and place that "information" in a textbox to be part of the title in a report.  

I created an unbound textbox and placed =[Enter Your Name] on its control source hoping that it would prompt the user to [Enter a Name] and then that name will be populated within the title of the report but I am getting a #Name on the textbox and no prompt?

This article describes exactly what I need and I was following it but was getting a #Name? error.

Any ideas?
Question by:emacyam
    LVL 61

    Accepted Solution

    Give this a try instead:

    = inputbox("Enter Your Name")

    The method in the article does not work for me either.
    LVL 56

    Expert Comment

    by:Jim Dettman (Microsoft MVP/ EE MVE)
    As a side comment, personally I think it's a poor way of gathering input as there is no validation. The user can easly cancel the dialog leaving it blank.

    You should be using a form to gather the data, then call the report from that form and have the report refer back to the form for the information.

    In this way, you can validate the inputs before you call the report (for example, ensuring that the preparer name is not left blank).


    Author Closing Comment

    Thanks mbizup.  Worked like a charm!

    Thanks too JDettman for the side comment.   Will take it into consideration for my other reports.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
    A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
    The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now