Him All,
I am trying to change the forecolor of multiple text boxes after the selection of one or many of these text boxes listed in a List box. As a user selects from the list the coresponding text box needs to change to red. There are a lot of text boxes and I do not want to have an individual code for every selection made. I have used the code following however the final line keeps giving me an error...Any idea why this does not work.
Dim Fld As String
For Each Changed_Sel In [Forms]![frmMain_Form]![Changed_List].ItemsSelected
Fld = [Forms]![frmMain_Form]![Changed_List].ItemData(Changed_Sel)
DoCmd.GoToControl Fld 'Seems fine to here..the text box is highlighted.
DoCmd.SetProperty Fld, acPropertyForeColor, 112 'This line fails to find Fld???
Next Changed_Sel.
Any help would be greatly appreciated.
Curry
I am trying to change the forecolor of multiple text boxes after the selection of one or many of these text boxes listed in a List box. As a user selects from the list the coresponding text box needs to change to red. There are a lot of text boxes and I do not want to have an individual code for every selection made. I have used the code following however the final line keeps giving me an error...Any idea why this does not work.
Dim Fld As String
For Each Changed_Sel In [Forms]![frmMain_Form]![Changed_List].ItemsSelected
Fld = [Forms]![frmMain_Form]![Changed_List].ItemData(Changed_Sel)
DoCmd.GoToControl Fld 'Seems fine to here..the text box is highlighted.
DoCmd.SetProperty Fld, acPropertyForeColor, 112 'This line fails to find Fld???
Next Changed_Sel.
Any help would be greatly appreciated.
Curry