PC Review


Reply
Thread Tools Rate Thread

Changing Form BackColor in VB

 
 
magmike
Guest
Posts: n/a
 
      29th Jan 2012
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
 
Reply With Quote
 
 
 
 
Bob Quintal
Guest
Posts: n/a
 
      29th Jan 2012
magmike <(E-Mail Removed)> wrote in
news:a8f3473c-fff7-4fe3-a93f-(E-Mail Removed)
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.


--
Bob Q.
PA is y I've altered my address.
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:33 PM.