• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4560
  • Last Modified:

Access 2007 - datasheet, make selected row change background color

I've got a form with a subform on it.  The subform is a continuous datasheet.  The purpose of the datasheet is not to enter data, but simply to display data.

When I user clicks on one of the rows in the datasheet I would like it's background color to change.  Or in other words, the record with focus should have a background color, and records should lose the background color on blur.
0
JosephEricDavis
Asked:
JosephEricDavis
  • 5
  • 3
1 Solution
 
Rey Obrero (Capricorn1)Commented:
?continuous datasheet,  is it continuous form or datasheet
0
 
JosephEricDavisAuthor Commented:
Well yes, a continuous form.
0
 
JosephEricDavisAuthor Commented:
I've found this...

http://bytes.com/topic/access/answers/847939-change-background-color-entire-row-s

Which talks about placing a rectangle with conditional formatting behind all the controls in a record.

What I'm not sure how to do though is to somehow trigger the value that the conditional formatting depends on in such a way that the current record selected would have the highlighted rectangle in the background.

I'm trying to use the Form_Current() event.  Is there a way to manipulate the controls of the current row from within this function?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Boyd (HiTechCoach) Trimmell, Microsoft Access MVPCommented:
I use this:

http://www.lebans.com/conditionalformatting.htm


Added support for Datasheet view and SubForms.

A2KConditionalFormatting.zip is a sample MDB demonstrating how to programmatically setup Conditional Formatting to simulate:

1) Highlighting of the Current Row for a Form in Continuous or Datasheet View

2) Highlighting of Alternate Rows for a Form in Continuous or Datasheet View
0
 
JosephEricDavisAuthor Commented:
That page is very unclear.  Maybe you could go through there and help me find the answer I need from it.
0
 
Boyd (HiTechCoach) Trimmell, Microsoft Access MVPCommented:
JosephEricDavis,

Did you get a chance to see the working example in the link I provided?
0
 
JosephEricDavisAuthor Commented:
Yes, I opened up the database file and looked at it, but I don't understand how it is being done.
0
 
Boyd (HiTechCoach) Trimmell, Microsoft Access MVPCommented:
JosephEricDavis,

Do you like any of the examples? If you will let me know  which form you like in the example I will be glad to show the steps for adding it into your database.

0
 
JosephEricDavisAuthor Commented:
Ok, I think I got it figured out.  Thanks for the guidance.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now