I am trying to create a form that uses multiple colors based on the status of a project(Green - engaged, Gray - complete, Red - Hold, White - not assigned...). I know that it has been done for alternate fields(gray/white) but has that been extended based on a value in the record to highlight the whole row?
multicolor Conditional Formatting for Datasheet Forms
Collapse
X
-
Actually you can have four colors, as long as one of the colors is the default white.
Welcome to bytes!
Linq ;0)>Comment
-
Sorry, you simply can't do this with a Datasheet View form. In Conditional Formatting from the menu, you're limited to 3 formats plus the default format. In a Single View form you can do all kinds of conditional formatting using the AfterUpdate events of a control and the form's OnCurrent, but not in Datasheet or Continuous views. In the latter two views, you're limited to doing things like locking and unlocking fields in code via the OnCurrent event, but you can't change colors/fonts, etc. because the change applies to all instances of the control.
There is no "row" object, only the controls that appear in a row. There's nothing that I've ever seen whereby you can do this kind of thing in a Datasheet form.You can, however, simulate this by doing the following:
Set up your form in Continuous View to look like a Datasheet View form.
In Design View, place an unbound textbox on your form.
Make it slightly longer and slightly taller than your other textboxes.
Move it so that it sits on top of your other textboxes, slightly to the left and right and slightly above and below the other textboxes.
With this textbox selected , goto the Menu - Format and select Send to Back.
Goto Formatting - Conditional Formatting
Select Expression Is [StatusField] = "engaged"
Select the background color as green.
Repeat this for other values of [StatusField].
Now the unbound textbox, which has become a "background " for your "row" will be colored according to the Conditional Formatting.
Linq ;0)>Comment
-
Originally posted by SanTangYou can set up conditional formatting for more than one cell in one row but it is a long and tedious job. Just do it for one cell then repeat it for all the others you need to have the same format.
Linq ;0)>Comment
Comment