HIGHLIGHT SELECTED RECORD

S

Sarah

Hi

I'm trying to highlight a specific record each time I click on on in a
continuous form.

I followed the following process in the form that I found - however, it
doesn't work so well and it doesn't change when i click on different items.

any advice is appreciated.

thanks,
Sarah


Add an invisible text box named txtCurKey to the form's
header sectiom. Then add a line of code to the form's
Current event:
Me.txtCurKey = Me.[your primary key field]

Next add a text box to the detail section. Make it as large
as the entire section and set its BackColor to the form's
back color. Now use Conditional Formatting (Format menu) to
set the Expression Is: option to:
[txtCurKey] = [your primary key field]
and select the desired highlight color for the back color
property.

Finally, use Send to Back (Format menu) to put the text box
behind all the other controls. You may also want to make
some of the other control's BaclStyle property to
Transparent.
 
R

ruralguy via AccessMonster.com

It looks to me like it would work Sarah. What do you mean by "it doesn't work
so well"?
Hi

I'm trying to highlight a specific record each time I click on on in a
continuous form.

I followed the following process in the form that I found - however, it
doesn't work so well and it doesn't change when i click on different items.

any advice is appreciated.

thanks,
Sarah

Add an invisible text box named txtCurKey to the form's
header sectiom. Then add a line of code to the form's
Current event:
Me.txtCurKey = Me.[your primary key field]

Next add a text box to the detail section. Make it as large
as the entire section and set its BackColor to the form's
back color. Now use Conditional Formatting (Format menu) to
set the Expression Is: option to:
[txtCurKey] = [your primary key field]
and select the desired highlight color for the back color
property.

Finally, use Send to Back (Format menu) to put the text box
behind all the other controls. You may also want to make
some of the other control's BaclStyle property to
Transparent.
 
S

Sarah

_________________________________________________________________
When I click on the selected record, it doesn't change the background - i
need to select a specific location on the record. or the background will
cover the entire record (sometimes not always - i can't find a trend) . or it
will highlight a record (cover all info), and then i click on the next and it
highlights that record too without unhighlighting the first.
i can't figure out.

_________________________________________________________________

ruralguy via AccessMonster.com said:
It looks to me like it would work Sarah. What do you mean by "it doesn't work
so well"?
Hi

I'm trying to highlight a specific record each time I click on on in a
continuous form.

I followed the following process in the form that I found - however, it
doesn't work so well and it doesn't change when i click on different items.

any advice is appreciated.

thanks,
Sarah

Add an invisible text box named txtCurKey to the form's
header sectiom. Then add a line of code to the form's
Current event:
Me.txtCurKey = Me.[your primary key field]

Next add a text box to the detail section. Make it as large
as the entire section and set its BackColor to the form's
back color. Now use Conditional Formatting (Format menu) to
set the Expression Is: option to:
[txtCurKey] = [your primary key field]
and select the desired highlight color for the back color
property.

Finally, use Send to Back (Format menu) to put the text box
behind all the other controls. You may also want to make
some of the other control's BaclStyle property to
Transparent.

--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
 
R

ruralguy via AccessMonster.com

What version of Access are you using?
I put together a test and can not get it to work at all with the directions
supplied.
I'll keep testing until I figure out what is going on. I use acXP.
_________________________________________________________________
When I click on the selected record, it doesn't change the background - i
need to select a specific location on the record. or the background will
cover the entire record (sometimes not always - i can't find a trend) . or it
will highlight a record (cover all info), and then i click on the next and it
highlights that record too without unhighlighting the first.
i can't figure out.

_________________________________________________________________
It looks to me like it would work Sarah. What do you mean by "it doesn't work
so well"?
[quoted text clipped - 29 lines]
 
S

Sarah

access 2003 on xp

thanks!



ruralguy via AccessMonster.com said:
What version of Access are you using?
I put together a test and can not get it to work at all with the directions
supplied.
I'll keep testing until I figure out what is going on. I use acXP.
_________________________________________________________________
When I click on the selected record, it doesn't change the background - i
need to select a specific location on the record. or the background will
cover the entire record (sometimes not always - i can't find a trend) . or it
will highlight a record (cover all info), and then i click on the next and it
highlights that record too without unhighlighting the first.
i can't figure out.

_________________________________________________________________
It looks to me like it would work Sarah. What do you mean by "it doesn't work
so well"?
[quoted text clipped - 29 lines]
some of the other control's BaclStyle property to
Transparent.

--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
 
R

ruralguy via AccessMonster.com

I'll have to admit that I cannot get any of these type of schemes working
with conditional format on AccessXP. Where was the reference to the code you
tried? Did it say ac2003 and up?
access 2003 on xp

thanks!
What version of Access are you using?
I put together a test and can not get it to work at all with the directions
[quoted text clipped - 16 lines]
 
S

Steve Sanford

I'm using A2K3 (XP Pro) and I tried the instructions. I was able to make it
work.... somewhat. Like Sarah said, if you click on the unbound text box in
the detail section in the wrong place, the text box moves to the front and
hides the other controls in that record.

I tried setting the text box properties Locked = TRUE and Enabled = FALSE. I
tried grouping the controls & text box. If I clicked in the wrong spot or
double clicked on the text box, the other controls in the record were still
hidden by the text box.

So I tried another way:

I have a field that is autonumber named ID (Yeah, I know... but this is a
test dB)
I added an unbound text box in the FORM header and named it "txtCurPK". For
now leave it visible.

In the form current event, I entered: Me.txtCurPK = Me.[id]

The detail BG color is the default gray. Select the controls in the detail
section and set their BG color to White.

With the controls still selected, open Conditional Formatting.
In the combo box of the first condition, change it to "Expression Is". In
the next box enter

[txtCurPK] = [id]

Set the BG to Light Yellow, the Font color to Black and make it bold. Click
OK.

Test it. If it highlights the controls, switch back to design mode and set
the text box "txtCurPK" visible property to NO.


Not quite what Sarah wanted. but , for me, it will draw attention to the
controls that are in the current record.

HTH
--
Steve S
--------------------------------
"Veni, Vidi, Velcro"
(I came; I saw; I stuck around.)


ruralguy via AccessMonster.com said:
I'll have to admit that I cannot get any of these type of schemes working
with conditional format on AccessXP. Where was the reference to the code you
tried? Did it say ac2003 and up?
access 2003 on xp

thanks!
What version of Access are you using?
I put together a test and can not get it to work at all with the directions
[quoted text clipped - 16 lines]
some of the other control's BaclStyle property to
Transparent.

--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
 
R

ruralguy via AccessMonster.com

Thanks for jumping in here Steve. This should help a bit.

Steve said:
I'm using A2K3 (XP Pro) and I tried the instructions. I was able to make it
work.... somewhat. Like Sarah said, if you click on the unbound text box in
the detail section in the wrong place, the text box moves to the front and
hides the other controls in that record.

I tried setting the text box properties Locked = TRUE and Enabled = FALSE. I
tried grouping the controls & text box. If I clicked in the wrong spot or
double clicked on the text box, the other controls in the record were still
hidden by the text box.

So I tried another way:

I have a field that is autonumber named ID (Yeah, I know... but this is a
test dB)
I added an unbound text box in the FORM header and named it "txtCurPK". For
now leave it visible.

In the form current event, I entered: Me.txtCurPK = Me.[id]

The detail BG color is the default gray. Select the controls in the detail
section and set their BG color to White.

With the controls still selected, open Conditional Formatting.
In the combo box of the first condition, change it to "Expression Is". In
the next box enter

[txtCurPK] = [id]

Set the BG to Light Yellow, the Font color to Black and make it bold. Click
OK.

Test it. If it highlights the controls, switch back to design mode and set
the text box "txtCurPK" visible property to NO.

Not quite what Sarah wanted. but , for me, it will draw attention to the
controls that are in the current record.

HTH
I'll have to admit that I cannot get any of these type of schemes working
with conditional format on AccessXP. Where was the reference to the code you
[quoted text clipped - 9 lines]
 

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