Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2002

    Unanswered: Formatting the detail field based on input.

    I need to figure a way to have the detail field shade itself light grey if there is data in a certain field.

    Does anyone know of a down-and-dirty "IF" statement that would do this? Probably as an event in the On Print module. I'm tearing my hair out and it must be simpler than I'm making it out to be.

    Alex B.

  2. #2
    Join Date
    Sep 2001
    Hope this help ==

    Private Sub Form_Load()
    Dim ctlCurrent As Control
    On Error Resume Next
    For Each ctlCurrent In Me.Detail.Controls
    If IsNull(ctlCurrent) Then
    With ctlCurrent
    .BackColor = -2147483643
    End With
    With ctlCurrent
    .BackColor = 8685056
    End With
    End If
    End Sub

  3. #3
    Join Date
    May 2002


    since you are talking about the onprint event i assume you are working on a report. you could also use the conditional formatting in the format menu. i am using access 2000 and i'm not sure if this is available in previous versions.

Posting Permissions

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