Hi there,
I am having much difficulty with what is probably a very simple
problem.
I have multiple check boxes, named Check1 to Check10. I would like
the code to run macros associated with each checkbox by using the
checkbox tag.
i.e. Check1.tag = CUSTMR
if Check1 = -1 then
runMacro "Update" & Check1.tag
Any help will be much appreciated.
Private Sub UpdateButton_Click()
Dim CheckCount As Integer
Dim strCheckName As String
Dim strCheckNameTag As String
Dim strCheckMacro As String
CheckCount = 1
Do While CheckCount < 11
strCheckName = "Me.Check" & CheckCount
strCheckNameTag = strCheckName & ".Tag"
strCheckMacro = "Update & " & strCheckNameTag
If strCheckName = -1 Then
DoCmd.RunMacro strCheckMacro
End If
CheckCount = CheckCount + 1
Loop
End Sub