Conditional Row coloring in Datasheet view

S

Steven

Is there a way to programatically color rows of a form in Datasheet view.
e.g.: all rows with a certain column value have a green background.
 
K

Klatuu

Use Conditional formatting.
Open your form in design view.
Select the column you want to format
From the main menu bar select Formt, Conditional Formatting.
 
S

Steven

Thanks but i would actually like to color entire rows that have identical
values when selected. For instance, in a list of employees and there
companies when any employee from Company X is selected, all employees from
Company X are highlighted (background green)

Thanks
 
K

Klatuu

Not a problem. Let's say you want to condition on field Company for a value
of X.
In the conditional Formating dialog, you would use the Field = condition and
enter X in the box.
In the other fields, you would select Expression. Then enter [Company] = "X"
 
S

Steven

Sorry i wasnt clear:
I have a form, in datasheet view, that lists employees from many companies
(Firstname, Lastname & Company) By selcting any employee i would like all
other employees from the same company to be highlighted (change color) This
has to be dynamic as i will not select the same company everytime.

For example:
The form contains a list of 10 employees, some from Kodak others from Xerox.
Upon selecting John Smith of Kodak i would like all other employees of Kodak
to have a green background. Likewise, upon selecting Jane Johnson of Xerox
all fellow employees with Xerox have green backgrounds and those of Kodak (or
any other company) are normal.

If you understood what i wanted to do and have answered this, can you please
be more clear, I did not understand your reply? Thanks very much

Klatuu said:
Not a problem. Let's say you want to condition on field Company for a value
of X.
In the conditional Formating dialog, you would use the Field = condition and
enter X in the box.
In the other fields, you would select Expression. Then enter [Company] = "X"

Steven said:
Thanks but i would actually like to color entire rows that have identical
values when selected. For instance, in a list of employees and there
companies when any employee from Company X is selected, all employees from
Company X are highlighted (background green)

Thanks
 
K

Klatuu

Sorry, Steven, I guess I did not fully understand.
My original answer will not get what you want. I am not sure how to make
this work. I will have to play with it a bit and get back to you.


Steven said:
Sorry i wasnt clear:
I have a form, in datasheet view, that lists employees from many companies
(Firstname, Lastname & Company) By selcting any employee i would like all
other employees from the same company to be highlighted (change color) This
has to be dynamic as i will not select the same company everytime.

For example:
The form contains a list of 10 employees, some from Kodak others from Xerox.
Upon selecting John Smith of Kodak i would like all other employees of Kodak
to have a green background. Likewise, upon selecting Jane Johnson of Xerox
all fellow employees with Xerox have green backgrounds and those of Kodak (or
any other company) are normal.

If you understood what i wanted to do and have answered this, can you please
be more clear, I did not understand your reply? Thanks very much

Klatuu said:
Not a problem. Let's say you want to condition on field Company for a value
of X.
In the conditional Formating dialog, you would use the Field = condition and
enter X in the box.
In the other fields, you would select Expression. Then enter [Company] = "X"

Steven said:
Thanks but i would actually like to color entire rows that have identical
values when selected. For instance, in a list of employees and there
companies when any employee from Company X is selected, all employees from
Company X are highlighted (background green)

Thanks

:

Use Conditional formatting.
Open your form in design view.
Select the column you want to format
From the main menu bar select Formt, Conditional Formatting.

:

Is there a way to programatically color rows of a form in Datasheet view.
e.g.: all rows with a certain column value have a green background.
 
K

kdee

Seems that it takes a lot of time to fill conditional formatting for all
fields in one row. At least if you have a lot of fields in one table.

The best part is that updating with new property if there are many fields
and especially if there are many rows goes very.................
............
..........
slow ;o)

Right now I'm trying to find another (programatical) solution for it.
Haven't found it yet.

Any suggestions?




Klatuu said:
Sorry, Steven, I guess I did not fully understand.
My original answer will not get what you want. I am not sure how to make
this work. I will have to play with it a bit and get back to you.


Steven said:
Sorry i wasnt clear:
I have a form, in datasheet view, that lists employees from many companies
(Firstname, Lastname & Company) By selcting any employee i would like all
other employees from the same company to be highlighted (change color) This
has to be dynamic as i will not select the same company everytime.

For example:
The form contains a list of 10 employees, some from Kodak others from Xerox.
Upon selecting John Smith of Kodak i would like all other employees of Kodak
to have a green background. Likewise, upon selecting Jane Johnson of Xerox
all fellow employees with Xerox have green backgrounds and those of Kodak (or
any other company) are normal.

If you understood what i wanted to do and have answered this, can you please
be more clear, I did not understand your reply? Thanks very much

Klatuu said:
Not a problem. Let's say you want to condition on field Company for a value
of X.
In the conditional Formating dialog, you would use the Field = condition and
enter X in the box.
In the other fields, you would select Expression. Then enter [Company] = "X"

:

Thanks but i would actually like to color entire rows that have identical
values when selected. For instance, in a list of employees and there
companies when any employee from Company X is selected, all employees from
Company X are highlighted (background green)

Thanks

:

Use Conditional formatting.
Open your form in design view.
Select the column you want to format
From the main menu bar select Formt, Conditional Formatting.

:

Is there a way to programatically color rows of a form in Datasheet view.
e.g.: all rows with a certain column value have a green background.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top