Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Manassas, Virginia, USA
    Posts
    363
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Rectangle box on Report (Access 2000 and 2002)

    I have a rectangle box on a report that I only want to be visible if the value of a field called AbsCnt is less than 5. I have been successful with textboxes containing iif statements such as: IIf(AbsCnt<5,[AbsDate]," ") but have been unable to think of a way to conditionally display a rectangle box or line on the report. Can this be done?
    Judy Jones, Computer Training Specialist
    Manassas, Virginia

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Rectangle box on Report (Access 2000 and 2002)

    You'll have to do this in code, in the On Format event of the section that contains the rectangle. For example, if the box is in the Detail section:

    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Me.rctMyBox.Visible = (Me.AbsCnt < 5)
    End Sub

  3. #3
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Manassas, Virginia, USA
    Posts
    363
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Rectangle box on Report (Access 2000 and 2002)

    Thanks, that worked great. That would probably be better to use even for the fields I got to work with iif statements.
    Judy Jones, Computer Training Specialist
    Manassas, Virginia

Posting Permissions

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