Conditional highlight

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
 
M

Marshall Barton

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.
 

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