I have an interesting situation. I have created a crosstab query and have created a report off of it. I want to do some conditional formatting on the report, but I need to be able to dynamically assign the field name that I am formatting.
For example, I have columns that represent days of the month. If the day of the month is a weekend, I want it to have a different color background.
I know how to determine if the day of the month is the weekend, however, when I find out which days of the month are on the weekend I want to be able to find that field/control and change the background color.
For example:
Let's say I have determined that the 4th of October is a weekend. My column/field in the crosstab query is 4. I need to assign 4 to the field's name so that I can reference it and change the background color.
I had thought I could create a field variable and assign the name property, but the field variable is read-only and I can't. What I was trying (to maybe help with understanding what I am asking) was:
Dim fldName as Field
fldName.Name = "4"
Me!fldName.Backcolor = RGB(255, 211, 155)
As I said before, this results in a read-only error.
Any ideas?
Thanks in advance for your help.
Tammy
Thank you for your help.
Tammy
For example, I have columns that represent days of the month. If the day of the month is a weekend, I want it to have a different color background.
I know how to determine if the day of the month is the weekend, however, when I find out which days of the month are on the weekend I want to be able to find that field/control and change the background color.
For example:
Let's say I have determined that the 4th of October is a weekend. My column/field in the crosstab query is 4. I need to assign 4 to the field's name so that I can reference it and change the background color.
I had thought I could create a field variable and assign the name property, but the field variable is read-only and I can't. What I was trying (to maybe help with understanding what I am asking) was:
Dim fldName as Field
fldName.Name = "4"
Me!fldName.Backcolor = RGB(255, 211, 155)
As I said before, this results in a read-only error.
Any ideas?
Thanks in advance for your help.
Tammy
Thank you for your help.
Tammy