CheckBox Transmitting values


G

Guest

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.
 
Ad

Advertisements

D

Dirk Goldgar

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])
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

checkbox values 4
Checkbox Value 2
Checkbox values 3
Checkbox Default Values 1
Checking value of checkbox 4
Find and Replace checkbox values? 0
Checkbox values at run time 5
Form checkboxes: value assignment 6

Top