How do I Change Tab Control Forecolour if it contains information

ptaylor-west

Registered User.
Local time
Today, 23:19
Joined
Aug 4, 2000
Messages
193
How do I write an event procedure to change the colour of the title text of the tab control if the control contains some text,ie: Is Not Null so that it would indicate to operators that they need to click on the tab as it contains information
 
Hi Paul

I don't think you can change the caption background colour or the text/foreground colour on a tab control ... in fact it is the Page of the tab control that has a caption. Tabs tend to have a very bland generic colour ... pity!

However, you could change the caption ... from "Click Me!" to "Empty" or whatever depending on whether certain fields displayed on that page of your tab control contained data or not.

Something along the lines of:

If IsNull(Me!txtAddress) Then
Me!pagAddress.Caption = "No Address"

Else
Me!pagAddress.Caption = "Click here for Address"

End If

This would be within the coding for OnCurrent for the form.

HTH

Rich Gorvin
 
Thanks Rich,

I haven't had chance to apply it yet but I will do so over the weekend and your solution is better than the colour idea anyway especially as I hadn't taken into account someone might have colour blindness

Paul
 

Users who are viewing this thread

Back
Top Bottom