G
Guest
Access 2003 headache, new guy thinks he's bitten off more than he can chew...
I have a report that has 11 controls to display the current subtotal of all
expenses relating to 11 budget catagories. These relate back to individual
budget limits for each catagory, limits set for each building in a project.
Building 1 has limits for Budget 1, Budget 2, Budget 3 etc.
This report needs to show where the budget subtotal to date is approaching
the limit and apply conditional formatting to highlight the appropriate
field. I thought about writing code for each control seperately, but I think
there has to be a way to capture the control names as a variable and the
control value as another so that a function can act on each on in some kind
of loop as set the formt prorties accordingly.
What
i have so far:
Dim strFieldName As String
Dim curFieldValue As Currency
strFieldName = "Me!txtBdgContExp"
curFieldValue = Me!txtBdgContExp
Select Case strFieldName
Case curFieldValue < 0
With strFieldName
.BackColor = 0
.ForeColor = 16777215
End With
Case... for the other criteria
I have a report that has 11 controls to display the current subtotal of all
expenses relating to 11 budget catagories. These relate back to individual
budget limits for each catagory, limits set for each building in a project.
Building 1 has limits for Budget 1, Budget 2, Budget 3 etc.
This report needs to show where the budget subtotal to date is approaching
the limit and apply conditional formatting to highlight the appropriate
field. I thought about writing code for each control seperately, but I think
there has to be a way to capture the control names as a variable and the
control value as another so that a function can act on each on in some kind
of loop as set the formt prorties accordingly.
What
i have so far:
Dim strFieldName As String
Dim curFieldValue As Currency
strFieldName = "Me!txtBdgContExp"
curFieldValue = Me!txtBdgContExp
Select Case strFieldName
Case curFieldValue < 0
With strFieldName
.BackColor = 0
.ForeColor = 16777215
End With
Case... for the other criteria