Ren said:
Salutations to all
My form contains several CheckBoxex.
What I need to do is pass a two values:
a) a value to get information in an array
b) the name of the CheckBox
It is possible to pass these value to the function?
Thanks to all for your help.
You don't say whether the function you want to pass them to has any
special requirements as to its arguments, but if you can write the
function any way you want, and you want to pass both the value of a
check box and its name, why not pass a reference to the check box
control itself, and let the function extract both its Value property and
its Name property. For example, the function could be written like
this:
'----- start of example code -----
Function ProcessCheckbox(pChk As Access.CheckBox)
With pChk
Debug.Print .Name, .Value
' Put your own code in place of the above.
End With
End Function
'----- end of example code -----
You could call the function using an expression like this:
Call ProcessCheckbox(Me!chkMyCheckbox)
or an event property line using a function expression like this:
=ProcessCheckbox([chkMyCheckbox])