Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,418
    Provided Answers: 7

    Unanswered: Report backcolor not working

    I store the paint colours in a database for marking the trees

    on a form I can

    if me.pcolour="" or isnull(me.pcolour) then

    me.tagcolor.Properties("backcolor") = 16777215 'white

    Else

    me.tagcolor.Properties("backcolor") = me.colour

    End If

    That work good everbody happy


    it also work on a reports

    putting the code into the on format of the Detail report

    But what I can't get going.

    when i have it in the sub report


    runing the subreport by then self are ok
    but when i run the master with the sub in it it does not


    WHY


    can some point to the right help file
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

  2. #2
    Join Date
    May 2005
    Posts
    1,191
    Not sure if this is the answer, but give the following (untested code) a try:
    I store the paint colours in a database for marking the trees
    Code:
    Dim lngColor as Long
    lngColor = dlookup("[FldName]", "TblName", SQLcriteria)
    If Nz(me.pcolour,"") = "" Then
       Me.ControlName.Backcolor = vbWhite
    Else
       Me.ControlName.Backcolor = lngColor
    End If
    Me.Geek = True

Posting Permissions

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