Mark Rock
Registered User.
- Local time
- Today, 10:19
- Joined
- Jan 5, 2007
- Messages
- 16
I should not be confused with someone that knows what they are doing and I only pretend to know what I want.
I am attempting to create a form entirely with VBA in Microsoft Access. On this form I am creating a listbox and a subform with a checkbox (actually several thus the Dim with an array of Controls below).
Listbox works. Checkboxes work without a subform. However, with the subform related code shown, the subform is created, but I never see the checkboxes appear within the subform (or anywhere else for that matter). I get no error messages.
Suggestions?
Relevant code below:
I searched for a similar posting (here and elsewhere) and have not found anything. I would appreciate the help if someone sees what I am doing wrong.
I am attempting to create a form entirely with VBA in Microsoft Access. On this form I am creating a listbox and a subform with a checkbox (actually several thus the Dim with an array of Controls below).
Listbox works. Checkboxes work without a subform. However, with the subform related code shown, the subform is created, but I never see the checkboxes appear within the subform (or anywhere else for that matter). I get no error messages.
Suggestions?
Relevant code below:
Dim myfrm As New Form
Dim mysubfrm As Control
Dim myctlbox As Control
Dim mychkbox(500) As Control
Dim num as Integer
num = 1
Set myfrm = CreateForm
Set myctlbox = CreateControl(myfrm.Name, acListBox, acDetail, "", "", 60, 60, 5100, 600)
Set mysubfrm = CreateControl(myfrm.Name, acSubform, acDetail, "", "", 5350, 60, 6000, 6000)
Set mychkbox(num) = CreateControl(mysubfrm.Name, acCheckBox, acDetail, "", "", 5500, num * 275 + 45)
Set mychkbox(num).Name = "Checkbox_" & num
Dim mysubfrm As Control
Dim myctlbox As Control
Dim mychkbox(500) As Control
Dim num as Integer
num = 1
Set myfrm = CreateForm
Set myctlbox = CreateControl(myfrm.Name, acListBox, acDetail, "", "", 60, 60, 5100, 600)
Set mysubfrm = CreateControl(myfrm.Name, acSubform, acDetail, "", "", 5350, 60, 6000, 6000)
Set mychkbox(num) = CreateControl(mysubfrm.Name, acCheckBox, acDetail, "", "", 5500, num * 275 + 45)
Set mychkbox(num).Name = "Checkbox_" & num
I searched for a similar posting (here and elsewhere) and have not found anything. I would appreciate the help if someone sees what I am doing wrong.
Last edited: