Results 1 to 11 of 11
  1. #1
    Star Lounger
    Join Date
    Apr 2002
    Location
    Boise, Idaho, USA
    Posts
    94
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Format Check box (2002)

    Is there any way to change the size of a check box? I'd like to make the box a little bigger - easier to see on the form.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Format Check box (2002)

    Unfortunately, the size of the check box is fixed. As an alternative, you could use a combo box with two items (Yes/No or True/False), or a toggle button.

  3. #3
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Format Check box (2002)

    Deb

    I have had a similar problem in the past and have resolved the problem with a Toggle Button. I put a text field next to it which said True, if the button was depressed and False if it was not.

    Private Sub Toggle3_Click()
    If Me.Toggle3 = True Then

    Me.txtDec = "True"
    Else

    Me.txtDec = "False"

    End If

    End Sub

    You could format the textbox to "blend in" with the main form so it does not look to messy.

    Jerry
    Jerry

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Format Check box (2002)

    Instead of using a separate text box, you can change the Caption of the toggle button (it must be wide enough to accomodate the captions.)

    Private Sub Toggle3_Click()
    If Toggle3 Then
    Toggle3.Caption = "True"
    Else
    Toggle3.Caption = "False"
    End If
    End Sub

    or you could use "X" and "" (empty string) as captions, to simulate a check box. Make the font bold and adapt font size as needed.
    Attached Images Attached Images
    • File Type: png x.png (2.0 KB, 0 views)

  5. #5
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Format Check box (2002)

    Hi Hans,

    Yes, I like that, a nice touch. I think what Deb will have to think about is that a field will still have to be updated with the "decision" made by the toggle button so there will have to be a value assigned to a text field somewhere in the code. I suppose you could use True/False, 1/0 or any type of couplet to assist in querying later on.

    Jerry
    Jerry

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Format Check box (2002)

    Since the Value of a toggle button is True or False, you can bind the button directly to a Yes/No field in the record source of the form, i.e. set the Control Source to the name of a Yes/No field. Or if you want to use the value of the toggle button for filtering, you can use Forms!frmSomething!Toggle3 in the criteria line of a query or otherwise. (frmSomething and Toggle3 must be replaced by the appropriate names, of course)

  7. #7
    4 Star Lounger SteveH's Avatar
    Join Date
    Jan 2001
    Location
    Chelsea, Gtr London, United Kingdom
    Posts
    587
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Format Check box (2002)

    If you want to simulate a tick and a cross as the caption of your toggle button you could use uppercase O for a cross and uppercase P for a tick and format the font as Wingdings2.
    Steve H
    IT Lecturer/Access Developer
    O2K SR3/O2010; Win7Pro

  8. #8
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Format Check box (2002)

    Hi Hans
    Brilliant, I have learnt something today, that had not even occurred to me. Say goodbye to some unwabted fields in the future.

    Jerry
    Jerry

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Format Check box (2002)

    Yes, that is a good idea. An added advantage is that WingDings 2 has less leading (blank space) around the characters than most standard text fonts, so that the "tick" fits better in the toggle button.

  10. #10
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Format Check box (2002)

    Steve

    I love threads like this, they just seem to get little bits added to them.
    Just as a matter of interest, If a user does not have the WingDings2 font on their PC for what ever reason, your P and O idea would not work as it will go through the font list and find the nearest font starting with W . Do you know if there is a way to embed a font in the application, or would the use of graphics be more suitable?

    Jerry
    Jerry

  11. #11
    4 Star Lounger SteveH's Avatar
    Join Date
    Jan 2001
    Location
    Chelsea, Gtr London, United Kingdom
    Posts
    587
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Format Check box (2002)

    I don't think you can embed a font within an Access db. The graphics would provide an alternative but you would need to store the graphic somewhere and you might have hassle with pathnames in your code. I *think* Wingdings2 comes a standard font within Windows (or at least Office) so the chances of it being missing are pretty small.
    Steve H
    IT Lecturer/Access Developer
    O2K SR3/O2010; Win7Pro

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •