A
aworkingman
Guest
I have two forms; one is named “select” and has 9 check boxes
(arranged in a column, the top box is “check1”, the last is “check9”)
and the other is named “data” and has 9 textboxes (arranged in a
column, the top box is “text1”, the last is “text9”.
The user can check any box on the “select” form and then clicks
a command button opening up the “data” form.
I would like to use an “if” statement to determine if forms![select]![check#]
(# from 1 to 9) was checked, and then put some value into forms![data]![text#] (# from 1 to 9).
This is what I have so far, but don’t know how to correctly reference the checkbox or the textbox on either of the forms “select” or “data”:
Dim basecheck as String
Dim basetext as String
Dim x as Integer
For x = 1 To 9 Step 1
basecheck = “check” & x
basetext = “text” & x
If forms![select]![basecheck] = true then ‘ <<<<Having trouble here
Forms![data]![basetext] = “check box 1 was checked” ‘ <<<<Having trouble here
End If
Next x
Thanks for your help
(arranged in a column, the top box is “check1”, the last is “check9”)
and the other is named “data” and has 9 textboxes (arranged in a
column, the top box is “text1”, the last is “text9”.
The user can check any box on the “select” form and then clicks
a command button opening up the “data” form.
I would like to use an “if” statement to determine if forms![select]![check#]
(# from 1 to 9) was checked, and then put some value into forms![data]![text#] (# from 1 to 9).
This is what I have so far, but don’t know how to correctly reference the checkbox or the textbox on either of the forms “select” or “data”:
Dim basecheck as String
Dim basetext as String
Dim x as Integer
For x = 1 To 9 Step 1
basecheck = “check” & x
basetext = “text” & x
If forms![select]![basecheck] = true then ‘ <<<<Having trouble here
Forms![data]![basetext] = “check box 1 was checked” ‘ <<<<Having trouble here
End If
Next x
Thanks for your help