Hi All
I have created a report that shows all the subscription payments made during a calendar year. The subscription amount is £12 a month, the problem I have is that some people like to to pay two, three or more months in advance.
What I want the report to do is to change the backcolor of the payment textbox and change any extra month’s textbox’s if the payment amount was a multiple of £12
I can get the report to change backcolor of the textbox’s that have a payment in them, but with 12 calendar months in my report using the code below is going to take me ages, is there a easier way of doing it. Maybe by using a loop?
Regards
Nsquared.
I have created a report that shows all the subscription payments made during a calendar year. The subscription amount is £12 a month, the problem I have is that some people like to to pay two, three or more months in advance.
What I want the report to do is to change the backcolor of the payment textbox and change any extra month’s textbox’s if the payment amount was a multiple of £12
I can get the report to change backcolor of the textbox’s that have a payment in them, but with 12 calendar months in my report using the code below is going to take me ages, is there a easier way of doing it. Maybe by using a loop?
Code:
[COLOR=black][FONT=Verdana]Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)[/FONT][/COLOR]
[FONT=Verdana][COLOR=black]Subsamount = 12[/COLOR][/FONT]
[FONT=Verdana][COLOR=black]SubsAmountdiv = payvalue1 / Subsamount[/COLOR][/FONT]
[FONT=Verdana][COLOR=black]If SubsAmountdiv = 1 Then[/COLOR][/FONT]
[FONT=Verdana][COLOR=black] Me.payvalue1.BackColor = 4259584[/COLOR][/FONT]
[FONT=Verdana][COLOR=black] Else[/COLOR][/FONT]
[FONT=Verdana][COLOR=black] Me.payvalue1.BackColor = 16777215[/COLOR][/FONT]
[FONT=Verdana][COLOR=black]End If[/COLOR][/FONT]
[FONT=Verdana][COLOR=black]If SubsAmountdiv = 2 Then[/COLOR][/FONT]
[FONT=Verdana][COLOR=black] Me.payvalue1.BackColor = 4259584[/COLOR][/FONT]
[FONT=Verdana][COLOR=black] Me.payvalue2.BackColor = 4259584[/COLOR][/FONT]
[FONT=Verdana][COLOR=black] Else[/COLOR][/FONT]
[FONT=Verdana][COLOR=black] Me.payvalue1.BackColor = 16777215[/COLOR][/FONT]
[FONT=Verdana][COLOR=black] Me.payvalue2.BackColor = 16777215[/COLOR][/FONT]
[FONT=Verdana][COLOR=black]End If[/COLOR][/FONT]
[COLOR=black][FONT=Verdana]End Sub[/FONT][/COLOR]
Regards
Nsquared.