Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2006
    Posts
    110

    Unanswered: Report - labels and bound control

    Hi Guys,

    I need to confirm if this is the correct way to do this. I have made reports previously, but it has been awhile.

    I have a report that has a recordsource containing the following fields:

    count (fieldname) and fieldname.

    For my example, count(item_type), item_type.

    The item_type has null values (imported from a web survey). I want to show all records within the query, including those that came in with null values.

    In the past I have always had a bound control (text box), hid the bound control, and added a label. In the detail_format section I would add something like

    If IsNull(Me.Item_type) = True Then
    Me.Item_type_lbl.Caption = "NOT PROVIDED"
    Else
    Me.Item_type_lbl.Caption = Me.Item_Type
    End If

    I have always wondered if there was an easier way..

    My question is, is this the correct way to do this?

    Thanks!

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    I'm not sure about what you're doing, but from the sound of it I'd have a calculated field in the query or a textbox on the form with this type of thing:

    Nz(Item_type, "NOT PROVIDED")

    Which will replace a Null Item_type with the supplied text.
    Paul

Posting Permissions

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