Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2003
    Posts
    2

    Unanswered: Text box in report shows '#Error'

    I have a report which is based on a simple query. The query has two parameters, a start date and an end date. In the report, along with the results of the query, I have a text box which is intended to display these dates; its Control Source is set as follows:-

    ="Report Period: " & [Date Analysed - Start Date:] & " to " & [Date Analysed - End Date:] & " inclusive"

    If the query returns some data, the text box displays the dates as expected; however, if the query returns no data (because no records satisfy these dates), the text box displays '#Error'.
    Any ideas on how I can avoid this?

  2. #2
    Join Date
    Nov 2002
    Posts
    150

    Re: Text box in report shows '#Error'

    Originally posted by geoff coxon
    I have a report which is based on a simple query. The query has two parameters, a start date and an end date. In the report, along with the results of the query, I have a text box which is intended to display these dates; its Control Source is set as follows:-

    ="Report Period: " & [Date Analysed - Start Date:] & " to " & [Date Analysed - End Date:] & " inclusive"

    If the query returns some data, the text box displays the dates as expected; however, if the query returns no data (because no records satisfy these dates), the text box displays '#Error'.
    Any ideas on how I can avoid this?
    Use the IIF() function.

  3. #3
    Join Date
    Jan 2003
    Posts
    2
    Sorted - Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •