468,253 Members | 1,269 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,253 developers. It's quick & easy.

Going through the field list !

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.

Nov 13 '05 #1
1 1315
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
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Jonathan | last post: by
1 post views Thread by Don Leverton | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.