Conditional highlight

  • Thread starter Thread starter Ron Carr
  • Start date Start date
R

Ron Carr

Access 2007 I would like to highlight a text box (border style) based on a
value in another text box.
I have tried OnGotFocus and AfterUpdate and OnFormat for the detail section:
no joy.
Any advice on how to do this?
Both text boxes are direct from the table record, not calculated within the
report.
Many Thanks!
Code is:
If txtFlag Then
Me!txtVALUE.BorderStyle = fmBorderStyleSolid
Else
Me!txtVALUE.BorderStyle = fmBorderStyleTransparent
End If
Ron
 
Ron said:
Access 2007 I would like to highlight a text box (border style) based on a
value in another text box.
I have tried OnGotFocus and AfterUpdate and OnFormat for the detail section:
no joy.
Any advice on how to do this?
Both text boxes are direct from the table record, not calculated within the
report.
Many Thanks!
Code is:
If txtFlag Then
Me!txtVALUE.BorderStyle = fmBorderStyleSolid
Else
Me!txtVALUE.BorderStyle = fmBorderStyleTransparent
End If


That would be expected in Layout view.

The code needs to be in the Format event.

Try opening the report in Preview and see if it does
something.
 
Back
Top