Highlight Row

M

Mary Fetsch

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!
 
S

strive4peace

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
*
 
M

Mary Fetsch

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.

strive4peace said:
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 said:
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!
 
S

strive4peace

Hi Mary,

you're welcome :)

In a datasheet, what you could do, is highlight a main field on the
row...maybe even use an unbound control (with TabStop=No) first as an
indicator. Then, you can copy the indicator and the hidden
RecordID_current controls to other forms once you have it defined and
working on the first one -- you will also need to copy the little bit of
code for the current event behind each form

....in theory, this sounds good but I haven't tested it

Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



Mary said:
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.

strive4peace said:
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 said:
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!
 
F

fredg

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!

See Stephen Lebans site:
http://www.lebans.com/conditionalformatting.htm
 
M

Mary Fetsch

Thanks again, Crystal.

strive4peace said:
Hi Mary,

you're welcome :)

In a datasheet, what you could do, is highlight a main field on the
row...maybe even use an unbound control (with TabStop=No) first as an
indicator. Then, you can copy the indicator and the hidden
RecordID_current controls to other forms once you have it defined and
working on the first one -- you will also need to copy the little bit of
code for the current event behind each form

....in theory, this sounds good but I haven't tested it

Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



Mary said:
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.

strive4peace said:
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!
 
S

strive4peace

you're welcome, Mary ;) happy to help

Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



Mary said:
Thanks again, Crystal.

strive4peace said:
Hi Mary,

you're welcome :)

In a datasheet, what you could do, is highlight a main field on the
row...maybe even use an unbound control (with TabStop=No) first as an
indicator. Then, you can copy the indicator and the hidden
RecordID_current controls to other forms once you have it defined and
working on the first one -- you will also need to copy the little bit of
code for the current event behind each form

....in theory, this sounds good but I haven't tested it

Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



Mary said:
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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top