By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,460 Members | 1,191 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,460 IT Pros & Developers. It's quick & easy.

Checkboxes

P: n/a
DS
Any way of making a checkbox bigger? I thought there was but I can't
seem to remember. Thanks
DS
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
You can't alter the checkbox control in any way, but you can simulate a
larger one.

Create an unbound text box. Set the following properties: BackStyle to
Normal, BackColor to White, SpecialEffect to Sunken, BorderStyle to Solid,
Font to WinDings and FontSize to 14 (you may have to go back and fiddle with
the size later).

Now, let's assume your boolean field is named Discontinued. Set the text
box's ControlSource to

=IIf([Discontinued], Chr$(252), Chr$(32))

Chr$(252) is a checkmark in the WingDings font, so what this will do is set
the textbox to a checkmark if Discontinued is true, and to a blank if it's
false.

You'll also need code to ensure that the underlying recordset field is
updated to reflect changes in the check box's status, and you can use the
text box's Click event for this:

Private Sub txtBoundCheckBox_Click()
Me.Discontinued = Not Me.Discontinued
End Sub
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"DS" <bo******@optonline.net> wrote in message
news:U8**********************@news4.srv.hcvlny.cv. net...
Any way of making a checkbox bigger? I thought there was but I can't
seem to remember. Thanks
DS

Nov 13 '05 #2

P: n/a
DS
Douglas J. Steele wrote:
You can't alter the checkbox control in any way, but you can simulate a
larger one.

Create an unbound text box. Set the following properties: BackStyle to
Normal, BackColor to White, SpecialEffect to Sunken, BorderStyle to Solid,
Font to WinDings and FontSize to 14 (you may have to go back and fiddle with
the size later).

Now, let's assume your boolean field is named Discontinued. Set the text
box's ControlSource to

=IIf([Discontinued], Chr$(252), Chr$(32))

Chr$(252) is a checkmark in the WingDings font, so what this will do is set
the textbox to a checkmark if Discontinued is true, and to a blank if it's
false.

You'll also need code to ensure that the underlying recordset field is
updated to reflect changes in the check box's status, and you can use the
text box's Click event for this:

Private Sub txtBoundCheckBox_Click()
Me.Discontinued = Not Me.Discontinued
End Sub

Great, Thank You!
DS
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.