Mar 14, 2003 #1 kaplin Programmer Mar 14, 2003 11 CA I'm new to forms - how do I use a variable when calling a series of checkboxes. Ex: dim count as integer dim titles(20) as string for count = 1 to 20 titles(count) = myForm."checkbox" & count.caption next count
I'm new to forms - how do I use a variable when calling a series of checkboxes. Ex: dim count as integer dim titles(20) as string for count = 1 to 20 titles(count) = myForm."checkbox" & count.caption next count
Mar 14, 2003 #2 RobBroekhuis Technical User Oct 15, 2001 1,971 US No can do. This is so common, someone should write a FAQ! Usually the solution is something like dim count as integer dim titles(20) as string dim ctrl as object for each ctrl in myForm.controls if left(ctrl.name)="checkbox" then titles(val(mid(ctrl.name,9))) = ctrl.caption end if next ctrl Rob Upvote 0 Downvote
No can do. This is so common, someone should write a FAQ! Usually the solution is something like dim count as integer dim titles(20) as string dim ctrl as object for each ctrl in myForm.controls if left(ctrl.name)="checkbox" then titles(val(mid(ctrl.name,9))) = ctrl.caption end if next ctrl Rob
Mar 14, 2003 Thread starter #3 kaplin Programmer Mar 14, 2003 11 CA Wow - and to think it sounds like such a simple question! Thanks. Upvote 0 Downvote