Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004

    Unanswered: Displaying values on a report

    Hello, I have a query with the following parameter set on the [ActiveStatus] field: Like [Forms]![SoftwareOrderReportForm]![ActiveStatus] & "*"

    The ActiveStatus combo box on the SoftwareOrderReportForm form uses a picklist with either "Active" or "Inactive" as the options. Or you can leave it the field blank for both options.

    I would like to display the value from this field on the report, but am not sure how to do it when the field is left blank. I assume I need an If statment, but not sure of the syntax.

    thanks for your help.

  2. #2
    Join Date
    Nov 2003
    Set the On Format event of the report section where your report field is located (usually the Detail section) to [Event Procedure]. Open the VBEditor for this event and place in the following code line:

    If the report field is unbound then use:

    If not IsNull(Forms![SoftwareOrderReportForm]![ActiveStatus]) Then
    Me.myReportField = Forms![SoftwareOrderReportForm]![ActiveStatus]
    Me.myReportField = "N/A" 'or whatever you want it to read.
    End If
    There are easier ways to do this but this gives you a quick idea what can be done.

Posting Permissions

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