>I understand that this is a design time operation. The purpose is to let
>multiple users have their own specialized (and spelializable) matrix without
[quoted text clipped - 59 lines]
>> >> make the needed controls Visible and adjust the Top and Left
>> >> properties.
Thanks.
I presume the routine would look something like:
Set ctl00_00 = Createcontrol(frm.Name, acOptioinButton, , "", "", intX, intY)
Set ctl00_01 = Createcontrol(frm.Name, acOptioinButton, , "", "", intX, intY)
etc. through the last control then manipulate them after they are all created.
> What I am saying is that you should precreate a large (?)
> pool of precreated invisible controls and manipulate them at
[quoted text clipped - 74 lines]
> >> >> make the needed controls Visible and adjust the Top and Left
> >> >> properties.
Marshall Barton - 02 Mar 2007 18:33 GMT
I was thinking of something more like:
Public Sub MakeOptions()
Dim ctl As Control
Dim intX As Integer, intY As Integer
For intX = 0 To 10
For intY = 0 To 15
Set ctl = CreateControl("theform", acOptionButton)
ctl.Name = "ctl" & intX & "_" & intY
ctl.Visible = False
Next intY
Next intX
End Sub
Open the form in design view and run the above procedure
from the debug window. Then close and save the form.
Then, at run time, when you want to display some of the
controls according to the data in your table, use something
along these lines (in the forms Load event??):
Set rs = OpenRecordset("SELECT f1,... FROM ... WHERE ...")
IntX = 0 : intY = 0
Do Until rs.EOF
With Me("ctl" & intX & "_" & intY)
.Top = 300*intY 'vertical spacing in twips
.Left = 1000*intX 'horizontal spacing
.ControlSource = rs!fieldname
.Visible = True
End With
rs.MoveNext
Loop

Signature
Marsh
MVP [MS Access]
>I presume the routine would look something like:
>Set ctl00_00 = Createcontrol(frm.Name, acOptioinButton, , "", "", intX, intY)
[quoted text clipped - 79 lines]
>> >> >> make the needed controls Visible and adjust the Top and Left
>> >> >> properties.