Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Report Code (Access 97)

    I have the following code in a report:

    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    If Me![SpecialistLName] = "Cain" Or Me![SpecialistLName] = "Kramer" Then

    If Me![Text23] > 89 Then
    Me![lblmessage].Caption = "Far Exceeds Expectations"
    Else
    If Me![Text23] > 76 And Me![DocWeight] < 90 Then
    Me![lblmessage].Caption = "Exceeds Expectations"
    Else
    If Me![Text23] > 66 And Me![DocWeight] < 77 Then
    Me![lblmessage].Caption = "Achieves Expectations"
    Else
    Me![lblmessage].Caption = " "
    End If
    End If
    End If
    End If


    If Me![SpecialistLName] <> "Cain" Or Me![SpecialistLName] <> "Kramer" Then

    If Me![Text23] > 135 Then
    Me![lblmessage].Caption = "Far Exceeds Expectations"
    Else
    If Me![Text23] > 115 And Me![DocWeight] < 136 Then
    Me![lblmessage].Caption = "Exceeds Expectations"
    Else
    If Me![Text23] > 99 And Me![DocWeight] < 116 Then
    Me![lblmessage].Caption = "Achieves Expectations"
    Else
    Me![lblmessage].Caption = " "
    End If
    End If
    End If
    End If


    End Sub

    If SpecialistLName = "Cain" or "Kramer" it doesn't assign the values specified. They get the same values as everyone else. Does anyone know why??/+

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Report Code (Access 97)

    I think that your second condition has to be :
    If Me![SpecialistLName] <> "Cain" AND Me![SpecialistLName] <> "Kramer" Then
    Francois

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Report Code (Access 97)

    Thanks - that worked!!

Posting Permissions

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