Gustav Brock
gustav at cactus.dk
Sat Jul 23 11:31:51 CDT 2011
Hi John and Arthur You also could loop exactly the controls in question: Set frm = Me.Form 'or a subform. For intControlM = 1 To 20 Set ctl = frm.Controls("M" & CStr(intControlM)) ' Do stuff. Next /gustav >>> jwcolby at colbyconsulting.com 23-07-2011 18:11:19 >>> I am just addressing how to find the controls not what you do with them when you find them. You could walk the collection once adding the control into a collection when it matches the name. Once you do that then you walk your collection instead of the form's. John W. Colby www.ColbyConsulting.com On 7/23/2011 11:41 AM, Arthur Fuller wrote: > I see what you're getting at but the part I don't like about this approach > is its need to visit all the controls, when I'm concerned only about the > ones that begin with "M" followed by a number. In this case, isn't it better > to create a collection based on this naming scheme? This is just a question; > you're the class guy. > > A.