Link to home
Start Free TrialLog in
Avatar of Engtech05
Engtech05Flag for United States of America

asked on

How do i pass check data to a text box on another form

I have a form frmviolations with 13 checkboxes and one cmd btn. when the button is clicked
I need any and all of the checkbox values passed back to a textbox on another form seperated
by a comma if need be.

Any help is appreciated.
Avatar of kbirecki
kbirecki
Flag of United States of America image

In the code for the command button:

frmOtherForm!TextField = me!ChkOne & "," & me!ChkTwo & "," & me!ChkThree & "," & me!ChkFour

...and add enough checkbox references as you need.
ASKER CERTIFIED SOLUTION
Avatar of Brook Braswell
Brook Braswell
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I either can not read or I have fat fingers today...
in these examples - I meant frmviolations rather than anything that looks similar..

:)
Happy Coding
Avatar of Engtech05

ASKER

Ok, that works, but it just passes a -1 or a 0 to the text box. Each checkbox has a text string that
is associated with it.
such as  checkbox1  = seatbelt, checkbox2 = driving fast, checkbox3 = no ID, etc.
How do I pass those values.
I am sorry it has been a long time since I have coded.
Brook1966
Good year there,

For the checkbox array are you using the chkMyBoxes as the array name
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks a bunch, back to salt mines! UGH