Highlight Current Record in Continuous Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I am using Access 2000. I have a main form frmRetroUnit (Single Form) with
2 subforms: frm_Stryker and frm_StrykerDetail. My question is regarding the
subform frm_Stryker (a continuous form). I want the current record to be
highlighted yellow.

I have completed what was suggested below from a post on this forum by Marsh
on7/29/04, “Make all of the controls in the detail section transparent
(BackStyle property). Then add a text box (‘txtBackground’) that's as big as
the entire section and use Send To Back (Format menu) to put it behind all
the other controls. Use Conditional Formatting (Format menu) to get the text
box's BackColor to display a different color for the current record.â€

How do I reference to the current record, in order to have the txtBackground
show only for that record? My unique record ID is called Req_ID. I do not
know how to write the conditional formatting expression to show only the
current record.
I hope I have given you enough information.

Thank you in advance,
Mary
 
MaryF said:
I am using Access 2000. I have a main form frmRetroUnit (Single Form) with
2 subforms: frm_Stryker and frm_StrykerDetail. My question is regarding the
subform frm_Stryker (a continuous form). I want the current record to be
highlighted yellow.

I have completed what was suggested below from a post on this forum by Marsh
on7/29/04, “Make all of the controls in the detail section transparent
(BackStyle property). Then add a text box (‘txtBackground’) that's as big as
the entire section and use Send To Back (Format menu) to put it behind all
the other controls. Use Conditional Formatting (Format menu) to get the text
box's BackColor to display a different color for the current record.”

How do I reference to the current record, in order to have the txtBackground
show only for that record? My unique record ID is called Req_ID. I do not
know how to write the conditional formatting expression to show only the
current record.

Add a hidden text box named txtCurrent to the subform's
header section. Use a line of code in the Current event
procedure to set it:
Me.txtCurrent = Me.Req_ID

Now you can use the CF expression:
[Req_ID] = [txtCurrent]
 
Back
Top