Help with Access form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm building a database and this database is very large. What did way tage
each text with a number some of the text may have the same nuber and this is
to let the reader know that its reflecting the same info. What I would like
to do is color code each text. Example: Dog (green)
Cat (blue)
-- Wolf (green)
Both dog, and wolf represent the same family so they both would have the
same color. Can any tell me how would go about executing this idea.
Thanks in advance
J.................
 
Yes, you would have to have to add a field to identify the "family" then use
conditional formatting in your fields to color it based on the family.
 
To make the background of the text dog, cat, etc. show the color, place the
family text box that Rick B showed you behind the animal text box. set the
background of the animal test box to transparent and set the text and the
background of the family to the color you want.

Rick said:
Yes, you would have to have to add a field to identify the "family" then use
conditional formatting in your fields to color it based on the family.
I'm building a database and this database is very large. What did way tage
each text with a number some of the text may have the same nuber and this
[quoted text clipped - 8 lines]
Thanks in advance
J.................
 
Forgot to say to make both the animal and the family text boxes the same size.

To make the background of the text dog, cat, etc. show the color, place the
family text box that Rick B showed you behind the animal text box. set the
background of the animal test box to transparent and set the text and the
background of the family to the color you want.
Yes, you would have to have to add a field to identify the "family" then use
conditional formatting in your fields to color it based on the family.
[quoted text clipped - 4 lines]
 
Hi J,

are you displaying the field in a form? If yes, go into the edit section,
click on the field which holds the Dog, Wolf data and selected format
conditioning. In there you can set the colors and more...

Hope that helped.

Robert
 
Conditional formating will only give you three possibilities.

The following code will give you more, but the number of posibilities
is limited simply because of monitor color and human eye
differentiation of colors. Your case will be conditioned on the field
that you add to use for distinguishing the grouping. You should
probably use a dropdown to establish only so many values and have them
spelled the same way always.

If you are going to try to do this on multiple forms, my suggestion is
that perhaps the table you use for that drop down include BOTH the
family name (Canine, feline, etc) and also the actual color number you
want to use. Then on any form on which coloring is desired you simply
add that table as a linked table and have the color value in the query
fields. That way you can add any that you need simply by updating the
table, (and you don't have to go try to find all the forms and update
their logic).

======================================
Here is an example of code used to change the bold and font colors on a

form that lists the weeks of a month and highlights the one for the
current control week.


Select Case WeekNumber
Case 1
Me.WhichW1Start.FontBold = True
Me.WhichW1Start.BackColor = 16711680
Me.WhichW1Start.ForeColor = 16777215
Me.WhichW1End.FontBold = True
Me.WhichW1End.BackColor = 16711680
Me.WhichW1End.ForeColor = 16777215
Me.Command35.SetFocus
Case 2
Me.WhichW2Start.FontBold = True
Me.WhichW2Start.BackColor = 16711680
Me.WhichW2Start.ForeColor = 16777215
Me.WhichW2End.FontBold = True
Me.WhichW2End.BackColor = 16711680
Me.WhichW2End.ForeColor = 16777215
Me.Command36.SetFocus
End Select

It is executed in the OnCurrent event. Caption and anything else that
you see in the format tab for a field are accessible and addressable.

This form was not bound so did not progress through records. If you
have one that does go through records AND the captions, etc can change
then you have to code all possibities. The default condition will only
exist on the open , from then on you have to assign the default
captions, etc yourself.
=========================================

Ron
 
Back
Top