I have several Access 2010 Reports. All have some Code behind the report for various reasons. One Report is give me a problem. I'm trying to set the backcolor of the Detail section depending on the results from 2 boolean fields. There are only 3 results that mean anything though. If 1 is True the other is irrelevant if that one is true then it depends on the second. So I put this code in the Detail section
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Not me.enrolled Then
detail.backcolor = vbYellow
Else
If Not Me.current Then
detail.backcolor = vbRed
Else
detail.backcolor = vbGreen
End if
End if
End Sub
Everytime I try to save this I get the following Error This form or report contains changes that are incompatible with the current database format. The form or report was not saved.
I tried adding those 2 fields to the detail section, changed the name of the controls and changed the if statement accordingly. Got the same result. Don't under stand why. The report is based on a query and there is 1 Group Header and the detail. Anybody have an Idea? This is Access 2010.
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Not me.enrolled Then
detail.backcolor = vbYellow
Else
If Not Me.current Then
detail.backcolor = vbRed
Else
detail.backcolor = vbGreen
End if
End if
End Sub
Everytime I try to save this I get the following Error This form or report contains changes that are incompatible with the current database format. The form or report was not saved.
I tried adding those 2 fields to the detail section, changed the name of the controls and changed the if statement accordingly. Got the same result. Don't under stand why. The report is based on a query and there is 1 Group Header and the detail. Anybody have an Idea? This is Access 2010.