Add Names of multiple CheckBoxes to a text box.

  • Thread starter Thread starter Kostas G
  • Start date Start date
K

Kostas G

Hi! I have a number of CheckBoxes and i want the Names or Labels to add in an
other textBox , so i will have a list from the checked boxes. for example
(Parent, friend, lover, e.t.c.). My problem is that i cannot find a way that
the labels are added , when i chech one automatically erase the other. I 've
tried the expression builder, for my textbox but the only result i got is 1-
true,0-false, values are added but only the numbers. I think it is very easy
and i am really angry with that.
Thank you.
 
Kostas

It sounds like you are trying to add the contents of the labels, not the
contents of the checkboxes themselves. You would need to refer to the
labels (not the checkboxes), and to their "Caption" property. You didn't
post how you're trying to do this...

Good luck

Jeff Boyce
<Access MVP>
 
Thanks Jeff,
i use the above code
(****one of the many checkboxes)

Private Sub StrSpouse_Click()
If StrSpouse = True Then
Me.StrengthsI.Text = Me.StrSpouse.Name
Else
If StrSpouse = False Then
Me.StrengthsI.Text = " "
End If
End If
End Sub

it doesn't work, do you have any idea if there is an command ADD CAPTION or
VALUE or something else to work in Access?

Jeff said:
Kostas

It sounds like you are trying to add the contents of the labels, not the
contents of the checkboxes themselves. You would need to refer to the
labels (not the checkboxes), and to their "Caption" property. You didn't
post how you're trying to do this...

Good luck

Jeff Boyce
Hi! I have a number of CheckBoxes and i want the Names or Labels to add in an
other textBox , so i will have a list from the checked boxes. for example
[quoted text clipped - 4 lines]
and i am really angry with that.
Thank you.
 
When you refer to a label (is that what you're doing with Me.StrengthsI?),
you need to refer to the .Caption property, not .Text property (I don't
believe labels have .Text).

Jeff Boyce
<Access MVP>

Kostas G via AccessMonster.com said:
Thanks Jeff,
i use the above code
(****one of the many checkboxes)

Private Sub StrSpouse_Click()
If StrSpouse = True Then
Me.StrengthsI.Text = Me.StrSpouse.Name
Else
If StrSpouse = False Then
Me.StrengthsI.Text = " "
End If
End If
End Sub

it doesn't work, do you have any idea if there is an command ADD CAPTION or
VALUE or something else to work in Access?

Jeff said:
Kostas

It sounds like you are trying to add the contents of the labels, not the
contents of the checkboxes themselves. You would need to refer to the
labels (not the checkboxes), and to their "Caption" property. You didn't
post how you're trying to do this...

Good luck

Jeff Boyce
Hi! I have a number of CheckBoxes and i want the Names or Labels to add in an
other textBox , so i will have a list from the checked boxes. for
example
[quoted text clipped - 4 lines]
and i am really angry with that.
Thank you.
 
Back
Top