On 6 Oct 2005 07:52:26 -0700,
pr*************@gmail.com wrote:
I have a form displaying a table in continuous view.
There is a combo-box in the footer containing the list of fields in the
table.
When the user selects a field from the combo-box, I would like to
change the back-color for the "selected" field to say "X" and set the
back-color of all the other fields to say "Y".
Could anyone please post some code showing me how to do this. I've gone
crazy trying to get this to work.
Thx & Best Rgds,
Prakash.
Code the Combo Box AfterUpdate event
Dim c As Control
For Each c In Controls
' Reset all controls to the original backcolor
If TypeOf c Is TextBox Or TypeOf c is ComboBox Then
c.BackColor = vbWhite ' or whatever color you want
End If
Next
' Set the backcolor of the field selected in the combo box
Me(ComboName).BackColor = vbBlue ' or whatever color you want
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail