Set Check box Values

E

Evan McCutchen

Hello,

On my companies form, I have a subform that contains ~30 checkboxes that
relate to what that company does. Is there a way that i can get each check
box to store a value other than -1, 0, or 1? I want to store the company's
ID number in place of either the -1, 0, or 1. Any help would be greatly
appreciated!

Thanks!
Evan M.
evan AT NOradiologySPAMonesource DOT com
 
D

Dirk Goldgar

Evan McCutchen said:
Hello,

On my companies form, I have a subform that contains ~30 checkboxes
that relate to what that company does. Is there a way that i can get
each check box to store a value other than -1, 0, or 1? I want to
store the company's ID number in place of either the -1, 0, or 1. Any
help would be greatly appreciated!

Thanks!
Evan M.
evan AT NOradiologySPAMonesource DOT com

Controls (such as check boxes) don't store values, they only present
them to the user. But a check box cannot represent any value other than
0, -1, or Null (and Null is only available if the check box is unbound
or bound to a numeric field, and its TripleState property is set to
True).

If what you have in mind is for the subform to present a list of items
with check boxes beside them -- one item and check box to a record --
and check off items to indicate that the current company is associated
with them, then it is possible with some rather elaborate code to make
this work. It might be easier to use a multiselect list box, and (using
code again) select/deselect items in the list box as you move from
company to company, by querying the table where the linking information
is stored. Naturally, the user's clicking on any item in the list box
would be used to update the linking table.
 

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

Top