Color subform tab blue when text is filled

  • Thread starter ielmrani via AccessMonster.com
  • Start date
I

ielmrani via AccessMonster.com

Hi,
I am trying to color a subform tab blue or red when 2 of its text boxes are
not null. Here is my code that I tried but it's not working:

If Forms![Centers of Influence subform].First Is Not Null And Forms![Centers
of Influence subform].Last Is Not Null Then
Forms![Centers of Influence subform].Page4781 = RGB(0, 0, 255) 'blue
Else
Forms![Centers of Influence subform].Page4781 = RGB(0, 0, 0) 'black

End If

can anyone tell me what's wrong with my code?
First and Last are the name of the text boxes in the subform.

Thanks in advance
 
D

Damon Heron

You can't change the color of tabs. The work around is to select the
tabcontrol style as None, and add an option group of toggle buttons. Then
manipulate the page selection and the toggle font colors with code.
If you want to change the background color, then you will need to create
your own images and use them as buttons.

Damon
 
I

ielmrani via AccessMonster.com

Thank you Damon

Damon said:
You can't change the color of tabs. The work around is to select the
tabcontrol style as None, and add an option group of toggle buttons. Then
manipulate the page selection and the toggle font colors with code.
If you want to change the background color, then you will need to create
your own images and use them as buttons.

Damon
Hi,
I am trying to color a subform tab blue or red when 2 of its text boxes
[quoted text clipped - 14 lines]
Thanks in advance
 
P

Peter Hibbs

If you are trying to change the colour of a Tab control have a look at
http://www.fontstuff.com/access/acctut12.htm

HTH

Peter Hibbs.

Thank you Damon

Damon said:
You can't change the color of tabs. The work around is to select the
tabcontrol style as None, and add an option group of toggle buttons. Then
manipulate the page selection and the toggle font colors with code.
If you want to change the background color, then you will need to create
your own images and use them as buttons.

Damon
Hi,
I am trying to color a subform tab blue or red when 2 of its text boxes
[quoted text clipped - 14 lines]
Thanks in advance
 

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