Howard Bash
asked on
Access 2007 How to Color Selected Row in VBA
I am looking for a snippet of code demonstrating how to set a selected row to a color.
Please advise.
Please advise.
By "row", do you mean a row in Datasheet view? If so, you'll have to use Conditional Formatting. The help topic is pretty thorough about the mechanics of this. The simplest way is to include a label or rectangle control that enclosed your entire Detail section, then set the Controls to all transparent backgrounds, then use CF to color the lable or rectangle.
ASKER
Yes, I mean the datasheet view. I am not clear at all about using a label or rectangle control. Do you mean to dynamically place a label over the selected row and set it's color?
If you could provide either a complete description, example, or reference to an example that would be great.
Also, not sure about the Help Topic to search on ... "Color datasheet row", "Using a label to color a row in a datasheet",...
Thanks.
If you could provide either a complete description, example, or reference to an example that would be great.
Also, not sure about the Help Topic to search on ... "Color datasheet row", "Using a label to color a row in a datasheet",...
Thanks.
You can't do that in Datasheet view (the rectangle or lable trick, that is) - I should have specified that this was for Continuous forms.
You'll have to apply formatting to each control on the Datasheet view. You'll do this in Design view - open the form in Design view, select a control, then click Format - Conditional Formatting. You can get to the help topic from there.
You'll have to apply formatting to each control on the Datasheet view. You'll do this in Design view - open the form in Design view, select a control, then click Format - Conditional Formatting. You can get to the help topic from there.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I would have preferred the solution to be in Access2007. But as long as the same principles can be applied in 2007... thanks.
;-)