harvesterlily
Programmer
I work a lot in Access using VBA and SQL. For whatever reason the reports sometimes throw me for a loop.
My current project is to automate our billing.
I am working in Access 2000. The reports are based a query. We bill based on income categories. I am grouping by categories. So far the layout and info is displaying properly. Instead of my category code, I would like to have a label with different captions based on the category value.
Example:
BillCat is name of field in my query results and the textbox on the report.
In the report detail code:
If BillCat = "A" Then
Me.lblA.visible = True
me.lblA.caption = "Cash Collections for March 2005"
ElseIf BillCat = "B" Then
Me.lblB.visible = True
me.lblB.caption = "Insurance Collections for March 2005"
elseif etc.....
end if
Many of our clients have multiple categories. My test client has 2 categories. This code is resulting in one label with the caption for lblA. It's not corresponding with the proper category. The other label is visible with "" appearing on the report.
Can someone please point me in the right direction on how to accomplish this?
Thanks
My current project is to automate our billing.
I am working in Access 2000. The reports are based a query. We bill based on income categories. I am grouping by categories. So far the layout and info is displaying properly. Instead of my category code, I would like to have a label with different captions based on the category value.
Example:
BillCat is name of field in my query results and the textbox on the report.
In the report detail code:
If BillCat = "A" Then
Me.lblA.visible = True
me.lblA.caption = "Cash Collections for March 2005"
ElseIf BillCat = "B" Then
Me.lblB.visible = True
me.lblB.caption = "Insurance Collections for March 2005"
elseif etc.....
end if
Many of our clients have multiple categories. My test client has 2 categories. This code is resulting in one label with the caption for lblA. It's not corresponding with the proper category. The other label is visible with "" appearing on the report.
Can someone please point me in the right direction on how to accomplish this?
Thanks