Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2011
    Posts
    2

    Unanswered: show name on report even when data is NULL

    Hello -

    I have this report in Access 2007 with a drop down box that you can select a name of an Employee and then enter a date range [Begin date] and [End date] if the employee selected did not have any case Routed to the report comes back with an #ERROR for the date range and the Assign to field is empty…
    Is there a way I can have access show me the date range the person enter and the name they selected? Since we print these report and email them – it looks a bit odd that we have to hand write in where the #ERROR is with the date and then will in the Assign to with the name we selected.
    Appreciate any suggestion and help thank you!

    Below is the VB code that call the drop down box... not sure if this is any help in understand the process but i figure i add it in ...

    Code:
    Private Sub Command8_Click()
    On Error GoTo Err_Command8_Click
       Dim stDocName As String
       stDocName = "CloseItemsBlue_rpt"
    DoCmd.OpenReport stDocName, acPreview, , "RouteTo = '" & Me.Combo10.Column(1) & "'"
             
    Exit_Command8_Click:
       Exit Sub
    Err_Command8_Click:
       MsgBox Err.Description
       Resume Exit_Command8_Click
    End Sub

  2. #2
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    This kinda depends on why you are getting the #Error in the date range.

    Is it because you are using the values returned from the query (which do not exist) or something else?

    You should be displaying the parameters that were supplied to the report for the data range.

    This article should help you with how this is done.

    ACC2000: How to Reference Parameters in Reports

  3. #3
    Join Date
    Nov 2011
    Posts
    2
    hi rokslide

    thanks for the repond - i read the link you provided and created the parameters but the date function is still showing up #ERROR...I have a field called StatusDate and that is where i have the Begin Date and End Date it's part of the query, when the user enter the StatusDate if there is NO data for that date, it return back blank with and #ERROR for the date field.

    Is there away I can have it show the date the user enter rather then #ERROR?

  4. #4
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    Is the "date function" using the date from the results or the data from the parameters???

    If it is using the date from the parameters then it sounds like you are calling the function incorrectly.

    If it is using the date from the results then you need to change it to use the date from the parameters.

Posting Permissions

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