H
Henro Veijer
Heloo,
I have a form with 4 buttons on it.
They are called btn1....4
There are also 4 subforms.
The subform control is called sub1....4 and each has as sourceobject
frm1...4.
I would like to do something like this but I do not know how to loop
through the names of the forms/buttons. Probably just a matter of the
right declarations but which ones?
Who is able and willing to tell me how I can loop through forms/
controls and set their properties?
To be clear: I just need to know how to do the looping., the rest is
clear.........
<code>
x=4 'X = 'the number of buttons and corresponding
suborms
for i = i to x
copy frm1 to [frm & i]
frmmain.[sub & i].form.sourceobject = strSQL
frmmain.[frm & i].form.backcolor = frmmain.[btn & i].backcolor
next
</code>
TIA,
Henro
I have a form with 4 buttons on it.
They are called btn1....4
There are also 4 subforms.
The subform control is called sub1....4 and each has as sourceobject
frm1...4.
I would like to do something like this but I do not know how to loop
through the names of the forms/buttons. Probably just a matter of the
right declarations but which ones?
Who is able and willing to tell me how I can loop through forms/
controls and set their properties?
To be clear: I just need to know how to do the looping., the rest is
clear.........
<code>
x=4 'X = 'the number of buttons and corresponding
suborms
for i = i to x
copy frm1 to [frm & i]
frmmain.[sub & i].form.sourceobject = strSQL
frmmain.[frm & i].form.backcolor = frmmain.[btn & i].backcolor
next
</code>
TIA,
Henro