Tab Control Box - Font Color

JohnD

Registered User.
Local time
Today, 07:21
Joined
Oct 4, 2005
Messages
98
I believe thats the proper word for it. Attached is a screenshot of a section of the database that I have started working on. It is to track placement for a college. Its my first ever and I am fairly good at making things look good, but as far as function - I am terrible.

I can change the raised box that the tab control sits on to a dark maroon when someone has a felony (so it notifies the user of this status)

Private Sub Form_Current()
If [Felony] = True Then
Felonybox.BackStyle = 1
Felonybox.BackColor = RGB(159, 19, 44)
Else
Felonybox.BackStyle = 1
Felonybox.BackColor = RGB(208, 207, 202)
End If

End Sub

I also have this done on After_Update.

I am trying to change the font on the Tab Control to Red when this occurs as well (only change the 'Criminal History CONFIDENTIAL' to red). I can not find this option anywhere, is this something that has been done or CAN be done?

Using A97

John D
 

Attachments

  • screenshot2.jpg
    screenshot2.jpg
    97.6 KB · Views: 234
Last edited:
I would have to say no. When you select the tab control there are no font options available for a specific tab so VBA would not be able to change it either.
 
Does that apply to the text/box inside the tab control? If I cant do the above, can I make the box surrounding the Felony / misdemeanor turn red in the event that it has been checked... I have tried the below..

Code:
Private Sub Form_Current()
 If [Felony] = True Then
    Felonybox.BackStyle = 1
    Felonybox.BackColor = RGB(159, 19, 44)
    crimebox.BorderColor = RGB(159, 19, 44)
Else
    Felonybox.BackStyle = 1
    Felonybox.BackColor = RGB(208, 207, 202)
    crimebox.BorderColor = 0
End If

End Sub

The box is etched (you can see it in the screenshot in my first post). This code does not change the box's color...in fact it does nothing. Suggestions?

John D
 
If FelonyBox is the name of your "Option Group" then you need to test for the value of the FelonyBox option group. Lets say you assigned a value of "2" to the Felony option and a 1 to the Misdomeanor option. Play [modify] with this and see what happens...

Code:
Private Sub Form_Current()

 If [FelonyBox ] = 2 Then
    Felonybox.BackStyle = 1
    Felonybox.BackColor = RGB(159, 19, 44)
    crimebox.BorderColor = RGB(159, 19, 44)
Else
    Felonybox.BackStyle = 1
    Felonybox.BackColor = RGB(208, 207, 202)
    crimebox.BorderColor = 0
End If

End Sub
 

Users who are viewing this thread

Back
Top Bottom