Change size of check box

  • Thread starter Thread starter toolman74
  • Start date Start date
T

toolman74

In Access 2003, is there anyway to change the size of a check box? If not,
does another edition offer this? Thanks!

Pamela
 
In Access 2003, is there anyway to change the size of a check box? If not,
does another edition offer this? Thanks!

Pamela

No you can't make the Access check box bigger, but you can work around
it.

Add an unbound text control to the form.
Set it's FontStyle to Wingdings.
Set it's FontSize to 24 (to start with).
Set the control's Width property to 0.3"
Set it's height to 0.3"
Set it's BorderStyle to Solid.
Border Width to 1 pt.
Name this control 'LargeCheck'.

Code it¢s click event:

Me.[CheckBoxName] = Not Me.[CheckBoxName]
If Me.[CheckBoxName] = True Then
Me.LargeCheck = Chr(252)
Else
Me.LargeCheck = ""
End If

Code the Form's Current event:

If Me.[CheckBoxName] = True Then
Me.LargeCheck = Chr(252)
Else
Me.LargeCheck = ""
End If

Clicking the cursor on the LargeCheck control will toggle it's value
just as a regular check box.
Note: You can colorize this control also.

Change the FontSize and the controls width and height as wanted.
 
Thanks, but I am now getting a mismatch error 13...I cut and pasted your code
into it and then replaced accordingly with the name you suggested,
LargeCheck. Here is my exact code:

Private Sub Form_Current()
If Me.[LargeCheck] = True Then
Me.LargeCheck = Chr(252)
Else
Me.LargeCheck = ""
End If

End Sub

Private Sub LargeCheck_Click()

Me.[LargeCheck] = Not Me.[LargeCheck]
If Me.[LargeCheck] = True Then
Me.LargeCheck = Chr(252)
Else
Me.LargeCheck = ""
End If

End Sub

Thanks so much!


fredg said:
In Access 2003, is there anyway to change the size of a check box? If not,
does another edition offer this? Thanks!

Pamela

No you can't make the Access check box bigger, but you can work around
it.

Add an unbound text control to the form.
Set it's FontStyle to Wingdings.
Set it's FontSize to 24 (to start with).
Set the control's Width property to 0.3"
Set it's height to 0.3"
Set it's BorderStyle to Solid.
Border Width to 1 pt.
Name this control 'LargeCheck'.

Code itʼs click event:

Me.[CheckBoxName] = Not Me.[CheckBoxName]
If Me.[CheckBoxName] = True Then
Me.LargeCheck = Chr(252)
Else
Me.LargeCheck = ""
End If

Code the Form's Current event:

If Me.[CheckBoxName] = True Then
Me.LargeCheck = Chr(252)
Else
Me.LargeCheck = ""
End If

Clicking the cursor on the LargeCheck control will toggle it's value
just as a regular check box.
Note: You can colorize this control also.

Change the FontSize and the controls width and height as wanted.
 
Thanks, but I am now getting a mismatch error 13...I cut and pasted your code
into it and then replaced accordingly with the name you suggested,
LargeCheck. Here is my exact code:

Private Sub Form_Current()
If Me.[LargeCheck] = True Then
Me.LargeCheck = Chr(252)
Else
Me.LargeCheck = ""
End If

End Sub

Private Sub LargeCheck_Click()

Me.[LargeCheck] = Not Me.[LargeCheck]
If Me.[LargeCheck] = True Then
Me.LargeCheck = Chr(252)
Else
Me.LargeCheck = ""
End If

End Sub

Thanks so much!

fredg said:
In Access 2003, is there anyway to change the size of a check box? If not,
does another edition offer this? Thanks!

Pamela

No you can't make the Access check box bigger, but you can work around
it.

Add an unbound text control to the form.
Set it's FontStyle to Wingdings.
Set it's FontSize to 24 (to start with).
Set the control's Width property to 0.3"
Set it's height to 0.3"
Set it's BorderStyle to Solid.
Border Width to 1 pt.
Name this control 'LargeCheck'.

Code itʼs click event:

Me.[CheckBoxName] = Not Me.[CheckBoxName]
If Me.[CheckBoxName] = True Then
Me.LargeCheck = Chr(252)
Else
Me.LargeCheck = ""
End If

Code the Form's Current event:

If Me.[CheckBoxName] = True Then
Me.LargeCheck = Chr(252)
Else
Me.LargeCheck = ""
End If

Clicking the cursor on the LargeCheck control will toggle it's value
just as a regular check box.
Note: You can colorize this control also.

Change the FontSize and the controls width and height as wanted.

You replaced [CheckBoxName] with the incorrect name.
None of us can 'see' your database, so sometimes we have to use
generic control names instead of your actual control names.
[CheckBoxName] is my generic control name.
You should have replaced that with the actual name of your existing
check box control.
"LargeCheck" is the name of the new text control you just added.

Me.[CheckBoxName] = Not Me.[CheckBoxName]
is what I wrote.

You changed it to
Me.[LargeCheck] = Not Me.[LargeCheck]

It should be

Me.[The current name of your check box] = Not Me.[The current name of
your check box]
If Me.[The current name of your check box] = True then

Also change [CheckBoxName] in the form's Current event.

Everything else looks OK as is.
 
So sorry. In re-reading my post I realize that maybe I wasn't clear that I
already did rename my check box, as your original post suggested, to
LargeCheck. Which is why I inserted the name LargeCheck in all of those
places. So the box name is LargeCheck and my code is as I listed in my
previous post but again, this yields me the mismatch 13 error. When I
changed the name of the text box, I did it under Properties, Other, Name.
When I select this control, the object box lists it as LargeCheck so I'm
confused as to why it isn't working... Thanks so much for your patience and
persistence!!

Pamela

fredg said:
Thanks, but I am now getting a mismatch error 13...I cut and pasted your code
into it and then replaced accordingly with the name you suggested,
LargeCheck. Here is my exact code:

Private Sub Form_Current()
If Me.[LargeCheck] = True Then
Me.LargeCheck = Chr(252)
Else
Me.LargeCheck = ""
End If

End Sub

Private Sub LargeCheck_Click()

Me.[LargeCheck] = Not Me.[LargeCheck]
If Me.[LargeCheck] = True Then
Me.LargeCheck = Chr(252)
Else
Me.LargeCheck = ""
End If

End Sub

Thanks so much!

fredg said:
On Wed, 18 Jun 2008 11:28:00 -0700, toolman74 wrote:

In Access 2003, is there anyway to change the size of a check box? If not,
does another edition offer this? Thanks!

Pamela

No you can't make the Access check box bigger, but you can work around
it.

Add an unbound text control to the form.
Set it's FontStyle to Wingdings.
Set it's FontSize to 24 (to start with).
Set the control's Width property to 0.3"
Set it's height to 0.3"
Set it's BorderStyle to Solid.
Border Width to 1 pt.
Name this control 'LargeCheck'.

Code itʼs click event:

Me.[CheckBoxName] = Not Me.[CheckBoxName]
If Me.[CheckBoxName] = True Then
Me.LargeCheck = Chr(252)
Else
Me.LargeCheck = ""
End If

Code the Form's Current event:

If Me.[CheckBoxName] = True Then
Me.LargeCheck = Chr(252)
Else
Me.LargeCheck = ""
End If

Clicking the cursor on the LargeCheck control will toggle it's value
just as a regular check box.
Note: You can colorize this control also.

Change the FontSize and the controls width and height as wanted.

You replaced [CheckBoxName] with the incorrect name.
None of us can 'see' your database, so sometimes we have to use
generic control names instead of your actual control names.
[CheckBoxName] is my generic control name.
You should have replaced that with the actual name of your existing
check box control.
"LargeCheck" is the name of the new text control you just added.

Me.[CheckBoxName] = Not Me.[CheckBoxName]
is what I wrote.

You changed it to
Me.[LargeCheck] = Not Me.[LargeCheck]

It should be

Me.[The current name of your check box] = Not Me.[The current name of
your check box]
If Me.[The current name of your check box] = True then

Also change [CheckBoxName] in the form's Current event.

Everything else looks OK as is.
 
toolman74 said:
So sorry. In re-reading my post I realize that maybe I wasn't clear that I
already did rename my check box, as your original post suggested, to
LargeCheck. Which is why I inserted the name LargeCheck in all of those
places. So the box name is LargeCheck and my code is as I listed in my
previous post but again, this yields me the mismatch 13 error. When I
changed the name of the text box, I did it under Properties, Other, Name.
When I select this control, the object box lists it as LargeCheck so I'm
confused as to why it isn't working... Thanks so much for your patience and
persistence!!
If Me.[LargeCheck] = True Then
Me.LargeCheck = Chr(252)

Either LargeCheck is a Boolean field or a character field. You treat it as
a Boolean (Yes/No) in the If statement but as a character in the assignment.

Tom Lake
 
Okay, I don't really know what that means - do you have a suggestion of how
to fix it? I just copied the code from what fredg gave me as tried-and-true.
The only difference I could see in the lack of brackets so I added brackets
to all of the LargeCheck, didn't work - took off all of the brackets, didn't
work. How else would I keep it consistent so that it is the correct type of
field Boolean or character. Also, which one should it be? Thanks!

Pamela

Tom Lake said:
toolman74 said:
So sorry. In re-reading my post I realize that maybe I wasn't clear that I
already did rename my check box, as your original post suggested, to
LargeCheck. Which is why I inserted the name LargeCheck in all of those
places. So the box name is LargeCheck and my code is as I listed in my
previous post but again, this yields me the mismatch 13 error. When I
changed the name of the text box, I did it under Properties, Other, Name.
When I select this control, the object box lists it as LargeCheck so I'm
confused as to why it isn't working... Thanks so much for your patience and
persistence!!
If Me.[LargeCheck] = True Then
Me.LargeCheck = Chr(252)

Either LargeCheck is a Boolean field or a character field. You treat it as
a Boolean (Yes/No) in the If statement but as a character in the assignment.

Tom Lake
 
LargeCheck is the name of the visible check box, but the "real" check box is
the hidden one. You need something like this in the Click event:

Me.[RealCheckBox] = Not Me.[RealCheckBox]
If Me.[RealCheckBox] = True Then
Me.LargeCheck = Chr(252)
Else
Me.LargeCheck = ""
End If

Similarly, the Current event would test for the value in RealCheckBox, and
assign a value to LargeCheck accordingly.

toolman74 said:
So sorry. In re-reading my post I realize that maybe I wasn't clear that
I
already did rename my check box, as your original post suggested, to
LargeCheck. Which is why I inserted the name LargeCheck in all of those
places. So the box name is LargeCheck and my code is as I listed in my
previous post but again, this yields me the mismatch 13 error. When I
changed the name of the text box, I did it under Properties, Other, Name.
When I select this control, the object box lists it as LargeCheck so I'm
confused as to why it isn't working... Thanks so much for your patience
and
persistence!!

Pamela

fredg said:
Thanks, but I am now getting a mismatch error 13...I cut and pasted
your code
into it and then replaced accordingly with the name you suggested,
LargeCheck. Here is my exact code:

Private Sub Form_Current()
If Me.[LargeCheck] = True Then
Me.LargeCheck = Chr(252)
Else
Me.LargeCheck = ""
End If

End Sub

Private Sub LargeCheck_Click()

Me.[LargeCheck] = Not Me.[LargeCheck]
If Me.[LargeCheck] = True Then
Me.LargeCheck = Chr(252)
Else
Me.LargeCheck = ""
End If

End Sub

Thanks so much!

:

On Wed, 18 Jun 2008 11:28:00 -0700, toolman74 wrote:

In Access 2003, is there anyway to change the size of a check box?
If not,
does another edition offer this? Thanks!

Pamela

No you can't make the Access check box bigger, but you can work around
it.

Add an unbound text control to the form.
Set it's FontStyle to Wingdings.
Set it's FontSize to 24 (to start with).
Set the control's Width property to 0.3"
Set it's height to 0.3"
Set it's BorderStyle to Solid.
Border Width to 1 pt.
Name this control 'LargeCheck'.

Code itʼs click event:

Me.[CheckBoxName] = Not Me.[CheckBoxName]
If Me.[CheckBoxName] = True Then
Me.LargeCheck = Chr(252)
Else
Me.LargeCheck = ""
End If

Code the Form's Current event:

If Me.[CheckBoxName] = True Then
Me.LargeCheck = Chr(252)
Else
Me.LargeCheck = ""
End If

Clicking the cursor on the LargeCheck control will toggle it's value
just as a regular check box.
Note: You can colorize this control also.

Change the FontSize and the controls width and height as wanted.

You replaced [CheckBoxName] with the incorrect name.
None of us can 'see' your database, so sometimes we have to use
generic control names instead of your actual control names.
[CheckBoxName] is my generic control name.
You should have replaced that with the actual name of your existing
check box control.
"LargeCheck" is the name of the new text control you just added.

Me.[CheckBoxName] = Not Me.[CheckBoxName]
is what I wrote.

You changed it to
Me.[LargeCheck] = Not Me.[LargeCheck]

It should be

Me.[The current name of your check box] = Not Me.[The current name of
your check box]
If Me.[The current name of your check box] = True then

Also change [CheckBoxName] in the form's Current event.

Everything else looks OK as is.
 
Great! It's all becoming more clear. Where do I find the name for the
"realcheckbox?" Are you talking about the underlying field that I have in my
table which is a Yes/No?

BruceM said:
LargeCheck is the name of the visible check box, but the "real" check box is
the hidden one. You need something like this in the Click event:

Me.[RealCheckBox] = Not Me.[RealCheckBox]
If Me.[RealCheckBox] = True Then
Me.LargeCheck = Chr(252)
Else
Me.LargeCheck = ""
End If

Similarly, the Current event would test for the value in RealCheckBox, and
assign a value to LargeCheck accordingly.

toolman74 said:
So sorry. In re-reading my post I realize that maybe I wasn't clear that
I
already did rename my check box, as your original post suggested, to
LargeCheck. Which is why I inserted the name LargeCheck in all of those
places. So the box name is LargeCheck and my code is as I listed in my
previous post but again, this yields me the mismatch 13 error. When I
changed the name of the text box, I did it under Properties, Other, Name.
When I select this control, the object box lists it as LargeCheck so I'm
confused as to why it isn't working... Thanks so much for your patience
and
persistence!!

Pamela

fredg said:
On Wed, 18 Jun 2008 20:05:00 -0700, toolman74 wrote:

Thanks, but I am now getting a mismatch error 13...I cut and pasted
your code
into it and then replaced accordingly with the name you suggested,
LargeCheck. Here is my exact code:

Private Sub Form_Current()
If Me.[LargeCheck] = True Then
Me.LargeCheck = Chr(252)
Else
Me.LargeCheck = ""
End If

End Sub

Private Sub LargeCheck_Click()

Me.[LargeCheck] = Not Me.[LargeCheck]
If Me.[LargeCheck] = True Then
Me.LargeCheck = Chr(252)
Else
Me.LargeCheck = ""
End If

End Sub

Thanks so much!

:

On Wed, 18 Jun 2008 11:28:00 -0700, toolman74 wrote:

In Access 2003, is there anyway to change the size of a check box?
If not,
does another edition offer this? Thanks!

Pamela

No you can't make the Access check box bigger, but you can work around
it.

Add an unbound text control to the form.
Set it's FontStyle to Wingdings.
Set it's FontSize to 24 (to start with).
Set the control's Width property to 0.3"
Set it's height to 0.3"
Set it's BorderStyle to Solid.
Border Width to 1 pt.
Name this control 'LargeCheck'.

Code itʼs click event:

Me.[CheckBoxName] = Not Me.[CheckBoxName]
If Me.[CheckBoxName] = True Then
Me.LargeCheck = Chr(252)
Else
Me.LargeCheck = ""
End If

Code the Form's Current event:

If Me.[CheckBoxName] = True Then
Me.LargeCheck = Chr(252)
Else
Me.LargeCheck = ""
End If

Clicking the cursor on the LargeCheck control will toggle it's value
just as a regular check box.
Note: You can colorize this control also.

Change the FontSize and the controls width and height as wanted.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail


You replaced [CheckBoxName] with the incorrect name.
None of us can 'see' your database, so sometimes we have to use
generic control names instead of your actual control names.
[CheckBoxName] is my generic control name.
You should have replaced that with the actual name of your existing
check box control.
"LargeCheck" is the name of the new text control you just added.

Me.[CheckBoxName] = Not Me.[CheckBoxName]
is what I wrote.

You changed it to
Me.[LargeCheck] = Not Me.[LargeCheck]

It should be

Me.[The current name of your check box] = Not Me.[The current name of
your check box]
If Me.[The current name of your check box] = True then

Also change [CheckBoxName] in the form's Current event.

Everything else looks OK as is.
 
You can use the name of the underlying field. Something that seems to have
been missing from the original reply is that CheckBoxName is either the name
of a hidden check box bound to the Yes/No field, or it is the name of the
field itself. I did some experimenting, and don't see any reason why you
can't just refer to the field. There seems to be no need to use a hidden
check box control.
BTW, you may want to add this line of code to the Click event:
Me.txtHidden.SetFocus
txtHidden is an unbound text box, width and height .01, back style and
border style transparent (and maybe with back color set to the same color as
the Detail section of the form). Despite the name, it is visible. The
reason for this is that the cursor in the check box is an unfamiliar sight
to most users, so the cursor moves out of the text box as soon as the click
happens. You could also set the focus to a different control such as a
visible text box or command button.

toolman74 said:
Great! It's all becoming more clear. Where do I find the name for the
"realcheckbox?" Are you talking about the underlying field that I have in
my
table which is a Yes/No?

BruceM said:
LargeCheck is the name of the visible check box, but the "real" check box
is
the hidden one. You need something like this in the Click event:

Me.[RealCheckBox] = Not Me.[RealCheckBox]
If Me.[RealCheckBox] = True Then
Me.LargeCheck = Chr(252)
Else
Me.LargeCheck = ""
End If

Similarly, the Current event would test for the value in RealCheckBox,
and
assign a value to LargeCheck accordingly.

toolman74 said:
So sorry. In re-reading my post I realize that maybe I wasn't clear
that
I
already did rename my check box, as your original post suggested, to
LargeCheck. Which is why I inserted the name LargeCheck in all of
those
places. So the box name is LargeCheck and my code is as I listed in my
previous post but again, this yields me the mismatch 13 error. When I
changed the name of the text box, I did it under Properties, Other,
Name.
When I select this control, the object box lists it as LargeCheck so
I'm
confused as to why it isn't working... Thanks so much for your
patience
and
persistence!!

Pamela

:

On Wed, 18 Jun 2008 20:05:00 -0700, toolman74 wrote:

Thanks, but I am now getting a mismatch error 13...I cut and pasted
your code
into it and then replaced accordingly with the name you suggested,
LargeCheck. Here is my exact code:

Private Sub Form_Current()
If Me.[LargeCheck] = True Then
Me.LargeCheck = Chr(252)
Else
Me.LargeCheck = ""
End If

End Sub

Private Sub LargeCheck_Click()

Me.[LargeCheck] = Not Me.[LargeCheck]
If Me.[LargeCheck] = True Then
Me.LargeCheck = Chr(252)
Else
Me.LargeCheck = ""
End If

End Sub

Thanks so much!

:

On Wed, 18 Jun 2008 11:28:00 -0700, toolman74 wrote:

In Access 2003, is there anyway to change the size of a check box?
If not,
does another edition offer this? Thanks!

Pamela

No you can't make the Access check box bigger, but you can work
around
it.

Add an unbound text control to the form.
Set it's FontStyle to Wingdings.
Set it's FontSize to 24 (to start with).
Set the control's Width property to 0.3"
Set it's height to 0.3"
Set it's BorderStyle to Solid.
Border Width to 1 pt.
Name this control 'LargeCheck'.

Code itʼs click event:

Me.[CheckBoxName] = Not Me.[CheckBoxName]
If Me.[CheckBoxName] = True Then
Me.LargeCheck = Chr(252)
Else
Me.LargeCheck = ""
End If

Code the Form's Current event:

If Me.[CheckBoxName] = True Then
Me.LargeCheck = Chr(252)
Else
Me.LargeCheck = ""
End If

Clicking the cursor on the LargeCheck control will toggle it's
value
just as a regular check box.
Note: You can colorize this control also.

Change the FontSize and the controls width and height as wanted.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail


You replaced [CheckBoxName] with the incorrect name.
None of us can 'see' your database, so sometimes we have to use
generic control names instead of your actual control names.
[CheckBoxName] is my generic control name.
You should have replaced that with the actual name of your existing
check box control.
"LargeCheck" is the name of the new text control you just added.

Me.[CheckBoxName] = Not Me.[CheckBoxName]
is what I wrote.

You changed it to
Me.[LargeCheck] = Not Me.[LargeCheck]

It should be

Me.[The current name of your check box] = Not Me.[The current name of
your check box]
If Me.[The current name of your check box] = True then

Also change [CheckBoxName] in the form's Current event.

Everything else looks OK as is.
 
Back
Top