Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2003
    Posts
    2

    Question Unanswered: conditional formatting on subreport

    Hallo Newsgroup,

    I have an unbound report with six subreports (sr).
    One of these subreports contains a bit of VBA-CODE to make a conditional formatting ('Backcolor') to a textbox.
    This report works fine on it's own.

    Placed on another report as subreport the following error message appears :

    run time error '2448'
    You cannot assign a value to this object.
    * The object might be a control on a write protected form.
    .... ( translated from german )

    This is the VBA_Code :
    Private Sub Detailbereich_Format(Cancel As Integer, FormatCount As Integer)
    If IsNumeric(Me.Ausfallproz) Then
    If Me.Ausfallproz > Me.ZW_RB Then
    Me.Ausfallproz.Properties("Backcolor") = 255
    Else
    Me.Ausfallproz.Properties("Backcolor") = 0
    End If

    End If
    End Sub



    I 'm using MS ACCESS 97 and Win 2000 prof Server

    Greetings

    Rainald

  2. #2
    Join Date
    Jul 2002
    Location
    Australia
    Posts
    147
    The ME probably refers to parent report when the code is being run, rather than the subreport..

    Try to work out from which repirt the vba is being run then you should be able to replace the ME, with the appropriate reference, such as me![SubReport_Name].Control or something similar.

    Cheers,
    Andrew
    There have been many posts made throughout the world.
    This was one of them.

  3. #3
    Join Date
    Jun 2003
    Posts
    2

    Thumbs up

    Thank You Bunce

    that works fine

    I' replaced 'Me.'

    by 'Report_Mainreport.Subreport.Report.'



    Tschüß

    RAAPEL

Posting Permissions

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