Allen

  • Thread starter Form Color Problem
  • Start date
F

Form Color Problem

I have a form with a subform with continuas View. You can
dblclick items on the subform and it will open another
form so you can edit the information. Well I have a
option group 1-7. Depending on the option selected a text
box on the form will change colors. The problem I am
having is when I have more than one item showing on the
subform when one of the times has focus the rest of the
items are the same color. When I change focus to another
item the rest changes to the same color as that. What I
want is all the items to show what colors they suppose to
be, and that is differant and not the same color. This is
my code, and i put it in the current event on the subform.

Private Sub Form_Current()

If [OPS] = 1 Then
[TBC].Visible = False
End If
If [OPS] = 2 Then
[TBC].BackColor = 13434828
[TBC].Visible = True
End If
If [OPS] = 3 Then
[TBC].BackColor = 9868950
[TBC].Visible = True
End If
If [OPS] = 4 Then
[TBC].BackColor = 52479
[TBC].Visible = True
End If
If [OPS] = 5 Then
[TBC].BackColor = 16751052
[TBC].Visible = True
End If
If [OPS] = 6 Then
[TBC].BackColor = 13421619
[TBC].Visible = True
End If
If [OPS] = 7 Then
[TBC].BackColor = 65535
[TBC].Visible = True
End If


End Sub

Can any body help. I don't think Conditional Formatting
will help, it only supports up to 3 items, I need up to 7
Items, and on one of the items I need to make the textbox
[TBC] visible False.

Thanks Allen
 

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

Similar Threads

Conditional Formatting 2
Form Color Problem 1
AfterUpdate 5
Deleting a Form Tab (Page) with VBA 5
Need help with coding runtime error. 1
Annual Calendar 1
Tab Controls 7
Can not get focus 3

Top