In MS Access form, how to color background of selected record?

Posted by PowerUser on Stack Overflow See other posts from Stack Overflow or by PowerUser
Published on 2010-03-11T18:34:24Z Indexed on 2010/03/11 19:04 UTC
Read the original article Hit count: 257

Filed under:
|

I have a somewhat complicated looking Access Form with a continuous display (meaning multiple records are shown at once). I'd like to change the background color of the selected record only so the end-user can easily tell which record they are on.

I'm thinking of perhaps a conditional format or maybe something like this:

Private Sub Detail_HasFocus()
    Detail.BackColor(me.color)=vbBlue
End Sub

and something similar for when that row loses focus. This code snippet obviously won't work, but it's the kind of code I'd like to achieve.

© Stack Overflow or respective owner

Related posts about ms-access

Related posts about vba