Hello all
I am trying to create a form dynamically, based on a selection of certain parameters in the first form
if the user chooses 2 values in a list box for example in the first form he will have a 2nd form with box entries for those two calues, each with an optiongroup, that do certain events when selected
so the code is similar to :
for j = 1 to numberOfClasses
Set ctlOptionGroupRATIO = CreateControl(frm.Name, acOptionGroup, , "", "", intgroupX, intgroupY)
With ctlOptionGroupRATIO
.Name = "Group_" & RATIOClasses(j)
.DefaultValue = 1
.BorderStyle = 1
.Height = 200
.Width = 2000
.OnClick = "[Event Procedure]"
End With
Next j
my pb is the following: how can u let the On Click point to the function in form module?
, i don t know how to deal with the event procedure, where should i define it?and should i make it dynamic, that is its name shoulddepend of class selected
for example
Private Sub Group_D_AfterUpdate()
bla bla bla
End Sub
and well can a function do the same job, instead of an event procedure?
if you can help me i would be very greatfull
I am trying to create a form dynamically, based on a selection of certain parameters in the first form
if the user chooses 2 values in a list box for example in the first form he will have a 2nd form with box entries for those two calues, each with an optiongroup, that do certain events when selected
so the code is similar to :
for j = 1 to numberOfClasses
Set ctlOptionGroupRATIO = CreateControl(frm.Name, acOptionGroup, , "", "", intgroupX, intgroupY)
With ctlOptionGroupRATIO
.Name = "Group_" & RATIOClasses(j)
.DefaultValue = 1
.BorderStyle = 1
.Height = 200
.Width = 2000
.OnClick = "[Event Procedure]"
End With
Next j
my pb is the following: how can u let the On Click point to the function in form module?
, i don t know how to deal with the event procedure, where should i define it?and should i make it dynamic, that is its name shoulddepend of class selected
for example
Private Sub Group_D_AfterUpdate()
bla bla bla
End Sub
and well can a function do the same job, instead of an event procedure?
if you can help me i would be very greatfull