Combo Box Format with VB cont.

M

Markus

The Combo Box List is bound to TBLReason which has Reason
Code(EV,CA,RE,...)and ID (1,2,3,...). It is bound to
column 1 and Limit to List is set at No in the QC10600
properties. The format stays as I move from one control to
the next. The problems is that the format stays when I
change records, I want the format to change as the value
changes. I posted the VB incorrectly, there is a with
statement. Also is there a way to do this with the
OnCurrent Property of the Form itself or a way to created
a module using the FormatCondition property?

Private Sub QC10600_AfterUpdate()
With Me.QC10600
Select Case .Value
Case "EV"
.BackColor = 16711680
.ForeColor = 16777215
.FontBold = True
Case "CA"
.BackColor = 57600
.ForeColor = 16777215
.FontBold = True
Case "RE"
.BackColor = 8388736
.ForeColor = 16777215
.FontBold = True
Case "TR"
.BackColor = 65535
.ForeColor = 16777215
.FontBold = True
Case "TO"
.BackColor = 255
.ForeColor = 16777215
.FontBold = True
Case "PR"
.BackColor = 435844
.BackColor = 16777215
.FontBold = True

End Select
End With
End Sub
-----Original Message-----
Is it a multicolumn combo box? If so, is the value you have listed the value from the
Bound Column? Also, the beginning of your With statement
is missing. Does it change when
you move away from the combo box to the next control?

--
Wayne Morgan
Microsoft Access MVP





.
..
 

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