Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Access 2007 - datasheet, make selected row change background color

Posted on 2011-02-21
9
Medium Priority
?
4,459 Views
Last Modified: 2012-05-11
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
Comment
Question by:JosephEricDavis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
9 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34947358
?continuous datasheet,  is it continuous form or datasheet
0
 
LVL 7

Author Comment

by:JosephEricDavis
ID: 34947370
Well yes, a continuous form.
0
 
LVL 7

Author Comment

by:JosephEricDavis
ID: 34947383
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
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 
LVL 21

Accepted Solution

by:
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP earned 2000 total points
ID: 34947425
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
 
LVL 7

Author Comment

by:JosephEricDavis
ID: 34947455
That page is very unclear.  Maybe you could go through there and help me find the answer I need from it.
0
 
LVL 21
ID: 34947598
JosephEricDavis,

Did you get a chance to see the working example in the link I provided?
0
 
LVL 7

Author Comment

by:JosephEricDavis
ID: 34947611
Yes, I opened up the database file and looked at it, but I don't understand how it is being done.
0
 
LVL 21
ID: 34947828
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
 
LVL 7

Author Comment

by:JosephEricDavis
ID: 34951616
Ok, I think I got it figured out.  Thanks for the guidance.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question