Checkboxes

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • DS

    Checkboxes

    Any way of making a checkbox bigger? I thought there was but I can't
    seem to remember. Thanks
    DS
  • Douglas J. Steele

    #2
    Re: Checkboxes

    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 txtBoundCheckBo x_Click()
    Me.Discontinued = Not Me.Discontinued
    End Sub


    --
    Doug Steele, Microsoft Access MVP

    (no e-mails, please!)



    "DS" <bootybox@opton line.net> wrote in message
    news:U8V7d.2843 1$kq6.18218261@ news4.srv.hcvln y.cv.net...[color=blue]
    > Any way of making a checkbox bigger? I thought there was but I can't
    > seem to remember. Thanks
    > DS[/color]


    Comment

    • DS

      #3
      Re: Checkboxes

      Douglas J. Steele wrote:
      [color=blue]
      > 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 txtBoundCheckBo x_Click()
      > Me.Discontinued = Not Me.Discontinued
      > End Sub
      >
      >[/color]
      Great, Thank You!
      DS

      Comment

      Working...