How do I make a box that can be "x" marked?

C

cherylsiny

Need to create a questionaire, with YES and NO boxes, that can be "X" marked
when clicked on. How do I do this?
 
R

Rick B

you can use checkmarks, not sure about 'x'. The checkbox is one of the
standard controls in the form building toolbox. It can be bound to a
true/false field.
 
J

John O. Graybill

Hi cherylsing:

Interesting problem. One solution would be to create two text boxes
and two transparent command buttons as follows:

Test Box 1
Name: tbxYesCheckBox
Height: 0.1688"
Width: 0.1688"
FontWeight: Bold
Label Caption: "Yes:"

Text Box 2
Name: tbxNoCheckBox
Height: 0.1688"
Width: 0.1688"
FontWeight: Bold
Label Caption: "No:"

Command Button 1
Name: cmdYesCheckBoxCover
Height: 0.1681"
Width: 0.1681"
Transparent = Yes

Command Button 2
Name: cmdNoCheckBoxCover
Height: 0.1681"
Width: 0.1681"
Transparent = Yes

Place the transparent command buttons directly over the little square
text boxes. This is will prevent the "I" cursor from parking in
the text box.

Put the following code in each of the transparent command button click
events:

If IsNull(Me!tbxYesCheckBox.Value) = True Then
Me!tbxYesCheckBox.Value = "X"
Me!tbxNoCheckBox.Value = Null
Else
Me!tbxYesCheckBox.Value = Null
Me!tbxNoCheckBox.Value = "X"
End If

This code should put an "X" in either the Yes or No text box check
box, but not both.

Hope this helps.

John
 
Top