View Full Version : Check Box Question


hlopez
02-03-2000, 06:17 PM
Is ther a way to assign a value to a text box using a check box?
I tried:
Private Sub Check83_Click()
If True Then Text81 = 5
If False Then Text81 = 0
End Sub
But once i mark the check box it will change to 5 but won't blank out when I uncheck...
I'll appreciate any help and please accept my appologies for my ignorance since I'm quit new to VB commands...thanks

Pat Hartman
02-04-2000, 11:38 AM
Checkboxes are used to represent true/false (checked/unchecked) conditions. If you want to store a value, you will need to change the field definition to text or number and use a textbox control.

If you have a series of check boxes and you want 1 answer you will need to modify your form. Add an option group control and in the option group add the number of radio buttons you need to represent the choices. Standard GUI design calls for the use of option buttons for this purpose not check boxes. The option group control will be bound to your table field and if button1 is clicked the value will be 1, if button2 is clicked the value will be 2, etc. Only one button may be checked at a time.

[This message has been edited by Pat Hartman (edited 02-04-2000).]