Changing Form BackColor in VB

M

magmike

I am using a continuous form that is set up to look like an Excel
sheet. I want to be able to highlight an entire record (a row of
sorts) a specific color if the Status field equals a certain value.
There would be multiple values/colors combinations.

I was hoping that by setting the detail backcolor would accomplish
this, however it changes every records detail backcolor. I've tried
setting the AfterUpdate event under the Status field to change each
fields Backcolor setting, but the color is only visible when present
in the field, and again, it is every record in the continuous form.

Finally I tried creating a box behind the fields and set all the
fields to transparent, and then upon evaluation the Status feild's
value, it changes every instance of the box in the continuous form.

Any ideas on how I can accomplish just changing the backcolor of the
specific row who's value is equal to a specific value?

Thanks in advance,
magmike
 
B

Bob Quintal

m:
I am using a continuous form that is set up to look like an Excel
sheet. I want to be able to highlight an entire record (a row of
sorts) a specific color if the Status field equals a certain
value. There would be multiple values/colors combinations.

I was hoping that by setting the detail backcolor would accomplish
this, however it changes every records detail backcolor. I've
tried setting the AfterUpdate event under the Status field to
change each fields Backcolor setting, but the color is only
visible when present in the field, and again, it is every record
in the continuous form.

Finally I tried creating a box behind the fields and set all the
fields to transparent, and then upon evaluation the Status feild's
value, it changes every instance of the box in the continuous
form.

Any ideas on how I can accomplish just changing the backcolor of
the specific row who's value is equal to a specific value?

Thanks in advance,
magmike

As you have discovered, he form's detail section in design view has
only one row, so Access does any changes to all rows

Your box behind the transparent ones is a step in the right
direction, You must use conditional formatting to control the
baxckground color. You also need for the condition to come from a
value in the table/query that is the source for the form.
 

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