Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Check Boxes

Status
Not open for further replies.

avaffa

Programmer
Jun 22, 2001
86
US
Is it possible to create multiple check boxes so that muliple values can be entered into one field? Also, I would like to insert text into the field not numeric values. Thanks!
 
.
Can I "piggyback" on this question?

I have a form that has multiple checkboxes. I need to fill a string in a separate field based on the checkbox values.
Like this...
Code:
CkBoxAA  CkBoxAB  CkBoxAC  CkBoxAD  CkBoxAE
  Yes      No       Yes      Yes      No

String in textBox: AA AC AD

Thanks from me too!

:cool: Gus Brunston
An old PICKer
padregus@home.com
 
dim sTextBox as string

if ckBoxAA = true then
sTextBox = "AA"
end if
if ckBoxAB = true then
sTextBox = sTextBox & "AB"
end if

etc etc
textBox = trim(sTextBox)

I am not sure where u would place this. Maybe on the beforeUpdate of the form. You probably don't need the '= True' bit. This may not be the best way of doing it but it should work.

Let me know,

Nick
 
.
Hi, Nick.

I see what you're getting at, but I haven't been able to make it work yet. Whenever I do (and I'm a persistent cuss, I'm told) I'll post it here.

Thanks.

:)

Gus Brunston
An old PICKer
padregus@home.com
 
Does anyone know how to create multiple check boxes so that multiple alphanumeric values can be entered into one field?
 
Just a thought on Gus's problem
he will need to change the checkbox names to check1 check2 etc. Then he can type the value he wants in the tag property. check1 tag = "AA" check2 tag = "AB" etc..

now he just cycles through the boxes
dim x as int
for x = 1 to 6'as many check boxes as he has
if me("check" & x) = true then
me.text1 = me.text1 & me("check" & x).tag & " "
end if
next x
this may also work for avaffa as tag will hold up to 2048 characters
good luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top