Thanks for your help, Crystal. I actually have a lot of datasheets where I'd
like to do this, but it will be too much effort to worry about each field in
each datasheet. I hoped I could do something to affect the whole row.
:
Hi Mary,
TO HIGHLIGHT THE CURRENT RECORD IN A CONTINUOUS FORM
make the following textbox controls in the detail section of your form:
name --> Me.RecordID_current
visible --> no
name --> HighlightBox
left --> 0
top --> 0
width --> width of detail section
height --> height of detail section, like 0.2
enabled --> false
locked --> true
tabstop --> false
send this control to the back*
in the design view of the form, select HighlightBox
you may need to use the object drop-down -- 1st icon on the formatting
toolbar since it is behind everything)
conditional formatting
condition 1 --> Expression Is
--> [RecordID] = [RecordID_current]
change fill/back color to LIGHT YELLOW or light gray
or whatever color you want for your highlight
If my detail section background is White, I like to use light yellow for
a highlight
WHERE
RecordID is the controlname of your ID field control
then, in the form OnCurrent event, assign a value to the unbound
RecordID_current
being unbound, it will have the same value on every record
'~~~~~~~~~~~~~~~~~~~~~~~~~
Private Sub Form_Current()
Me.RecordID_current = IIf([NewRecord], 0, [RecordID])
End Sub
'~~~~~~~~~~~~~~~~~~~~~~~~~
If you are using a datasheet, I believe you will need to set up
conditional formatting for each control as you can't use a control that
spans the whole line as you can in a continuous form
Warm Regards,
Crystal
*
have an awesome day
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
Mary Fetsch wrote:
In my Access 2000 datasheet, is there an easy way to highlight the row the
cursor is in? I don't want to select it, but I'd like to change the color to
a light gray. When the cursor leaves the row, I'd like to change it back to
it's original color. The goal is to easily see which row the cursor is in.
I don't want to have to go to each field in the row and adjust its color.
I'd like to be able to adjust the whole row at once.
Thanks!