Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subform datasheet - dynamic color 1

Status
Not open for further replies.

zqi

Programmer
May 8, 2002
10
0
0
US
Hi, all,

I am experiencing a trouble in changing the color (backcolor) of each row in a datasheet subform. Here is what i want to achieve:

I have a subform w/datesheet view on the main form. This subform is editable directly from the table records. The main form has no recordsource, but some buttons to be clicked.

On the subform, there is a text box called "txtStatus" with the different values of Open/Requested/Completed form the table. When the main form loaded, i like to see all rows in subform with txtStatus = "open" to appear in RED, rows with txtStatus = "Requested" in Yellow, and "Completed" in Green.

I think there should be a way for us to dynamic assign different backcolor for different rows in a datasheet view? But, i can NOT figure it out. Please help me.

Thanks.
 
Unfortunately, with Access 97 there really isn't a way to have different properties for different rows in a subform. Any change you make to the subform's control properties will apply to all the copies of that control. Likewise, any change to the datasheet properties will apply to all rows of the datasheet.

However, if you're using Access 2000 or later, you may be able to use Conditional Formatting to accomplish what you need. It's quite easy to use. Check the help file. Rick Sprague
 
Thanks Rick.

I use Access 2000, and did accomplish the job via Conditional Formatting, although some check boxes' backcolor can't be changed on the datasheet view.

I appreciate your information.

Zhong Qi
 
Can one have more than three conditions for the conditional format

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top