Individual formatting on a text box on a report w/tabular layou?

P

plh

Hyall,
I can change the background color of the detail in a report with tabular layout
(that is, similar to a continuous form) using Detail_Format:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
With Me
Select Case .txtCondition
Case "Green"
.Section("Detail").BackColor = vbWhite
Case "Yellow"
.Section("Detail").BackColor = vbYellow
Case "Red"
.Section("Detail").BackColor = vbRed
End Select
End With
End Sub

But what I want to do is change the background color of an individual text box
within the section. I tried:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
With Me
Select Case .txtCondition
Case "Green"
.txtCondition.BackColor = vbGreen
Case "Yellow"
.txtCondition.BackColor = vbYellow
Case "Red"
.txtCondition.BackColor = vbRed
End Select
End With
End Sub

But that had no effect. Is there some way to do it?
Thank You,
-plh
 
J

John W. Vinson

Is there some way to do it?

Depends on your Access version. Select the textbox in design view and use
Format... Conditional Formatting from the menu.

John W. Vinson [MVP]
 
P

plh

Depends on your Access version. Select the textbox in design view and use
Format... Conditional Formatting from the menu.

John W. Vinson [MVP]

Perfect -- Thank you Mr. Vinson!!
-plh
 

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