Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 97 conditional format?

Status
Not open for further replies.

Bretcutler

Technical User
Jan 5, 2001
14
US
I have been able to get the fontunderline and fontblod to work with the following code.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
DCUCapable.Properties("fontunderline") = DCUCapable > 1
End Sub

I need the background color to be changed though and can't figure it out... I am looking to do a three color setup with text also showing in the box. So the color needs to show as transparent.

Thanks alot,
Bret
 
yeah i found the transparent part but i need to be able to make the text box change to whatever color i want based on certain criteria. I just don't know if there is vb code for this or not. Something that i could put in place of the ("fontunderline"). Maybe this should be in vb for apps section?
 
if i were to use backcolor in the above VB how would i format it? I want to use the color's number such as 255 for red. I have been trying things like "backcolor 255" and "backcolor vbred" and nothing is working for me. So i need something else with this text or can i not do this? I have a feeling that Access 2000 would be nice right about now.
Thanks,
Bret
 
Use:

Me.TextBoxName.BackColor = 255
or
Me.TextBoxName.ForeColor = 198773
 
well i made it work.. :)

Here it is if you are looking for more info. I used red green and yellow for a typical stoplight chart. Thanks for the help everyone.

If DCUCapable > 4 Then
Me.DCUCapable.BackColor = 65280
ElseIf DCUCapable < 2 Then
Me.DCUCapable.BackColor = 255
Else
Me.DCUCapable.BackColor = 65535
End If

Later,
Bret
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top