472,145 Members | 1,561 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,145 software developers and data experts.

Check Box Size

Can you make a check box very big? It seems like when you drag it
bigger the little check is still the same size.

Thank you,

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #1
7 29289
Tony Johnson wrote:
Can you make a check box very big? It seems like when you drag it
bigger the little check is still the same size.

Thank you,

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Tony,

You can't make it bigger but you can work around it.
Here is the coding needed.

Set your actual CheckBoxName.Visible to No.

Add an unbound label to the form detail section.
Set its Caption to " " ( a space)
Set it's Font to WingDings
Set it's font size to whatever you want (perhaps 24)
Place this label where you wish to see the check mark.
Set it's special effects to Sunken (if you want).
Set it's BackColor to White (if you want).
I've named it LabelLargeCheck.

Code the new Label's Click event:

Private Sub LabelLargeCheck_Click()
[CheckBoxName] = Not ([CheckBoxName])
If [CheckBoxName] = True Then
LabelLargeCheck.Caption = Chr(252)
Else
LabelLargeCheck.Caption = " " ' a space
End If
End Sub
==========
Code the Form Current Event:

Private Sub Form_Current()
If Me.CheckBoxName = True Then
LabelLargeCheck.Caption = Chr(252)
Else
LabelLargeCheck.Caption = " " ' a space
End If
End Sub
===========

If you want a CheckBox field label then just add another unbound label
and set its caption to the CheckBox field name. Leave it Visible.

Don't forget to change the name of the CheckBoxName in this coding to
whatever your Checkbox field is.

After you open the form and use the check box label,
re-adjust the font size if needed, and the size of the label,
to square it around the check mark.
That should do it.

Note: because it's a label now, you can also change it's color, if you
want.

Clicking on the new Label is equivalent to clicking on the CheckBox
field itself.

--
Fred
Please reply only to this newsgroup.
I do not respond to personal e-mail.
Nov 12 '05 #2
thank you. Where do I fing the form's current event? You say to rename
the CheckBoxName to the actual name? The actual name is LargeCheckBox
correct?

I am wanting there to be a big "X" for where the check box is. Now I
only see the scissors. Is this code going to make an X? Is it going to
be for every vendor? I only want it to be on the ones that I choose.
thank you,
Tony

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #3
Tony Johnson wrote:

Tony,
I would strongly suggest when you are replying to, or referring to, a
previous post, that you include at least the relevant part of that post
with your new post.
Those who reply to newsgroup posts often reply to many per day. It's not
helpful to try and rely on someone else's memory to make sense of your
question.
thank you. Where do I fing the form's current event?
Display the form's Property sheet.
Click on the Data tab.
Click on the line that say's 'On Current'.
Write
[Event Procedure] on that line.
Enter the code I gave you between the 2 already existing lines, so that
when done, your code looks just like mine.
Caution... Since the first and last line already are written, do not
copy those lines from my code to yours.

Do the same for the other sub-procedure I gave you.
You'l find the LabelLargeCheck_Click event by clicking on the
LabelLargeCheck control and selecting the Data tab for that control.
Then write [Event Procedure] on that line and procede as above.
You say to rename
the CheckBoxName to the actual name? The actual name is LargeCheckBox
correct?
No! not correct. That's the generic name I gave to my new label check
box. I have no idea what your check box field name is.
Wherever I wrote CheckBoxName you write the actual name of your check
box field.

I am wanting there to be a big "X" for where the check box is. Now I
only see the scissors. Is this code going to make an X? Is it going to
be for every vendor? I only want it to be on the ones that I choose.
Well, your not going to get a big X, you're going to get a check mark.
That's what the Access Check box displays.
If you want a big 'X' change the chr(252) to chr(251) (or chr(253)). Try
them all. If you have set the Font to Wingdings you will get the correct
Check Mark or X.


thank you,
Tony

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


--
Fred
Please reply only to this newsgroup.
I do not respond to personal e-mail.
Nov 12 '05 #4
Fred,

I have entered in the code in the
FORM CURRENT EVENT:
Private Sub Form_Current()
If Me.Check117 = True Then
LabelLargeCheck.Caption = Chr(251)
Else
LabelLargeCheck.Caption = " "
End If
End Sub

AND LABELS CLICK EVENT:
Private Sub LabelLargeCheck_Click()
[LabelLargeCheck] = Not ([LabelLargeCheck])
If [LabelLargeCheck] = True Then
LabelLargeCheck.Caption = Chr(251)
Else
LabelLargeCheck.Caption = " "
End If
End Sub
The check117 is the name of the actual check box. There is not contrrol
source for it if that makes a difference. I know that you said to make
the check box invisible but when I need to have it visible so that I can
check it for a certain record that I want to see the big X. So, I made
it visible and then checked a record on the form and I could see the red
X but not until I paged down to the next record. It was pretty cool.
However, the red x is there for every record on the form now. I only
want to see it for a certain record that I check. Thanks for your help.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #5
Tony Johnson wrote:
Fred,

I have entered in the code in the
FORM CURRENT EVENT:
Private Sub Form_Current()
If Me.Check117 = True Then
LabelLargeCheck.Caption = Chr(251)
Else
LabelLargeCheck.Caption = " "
End If
End Sub

AND LABELS CLICK EVENT:
Private Sub LabelLargeCheck_Click()
[LabelLargeCheck] = Not ([LabelLargeCheck])
If [LabelLargeCheck] = True Then
LabelLargeCheck.Caption = Chr(251)
Else
LabelLargeCheck.Caption = " "
End If
End Sub
The check117 is the name of the actual check box. There is not contrrol
source for it if that makes a difference. I know that you said to make
the check box invisible but when I need to have it visible so that I can
check it for a certain record that I want to see the big X. So, I made
it visible and then checked a record on the form and I could see the red
X but not until I paged down to the next record. It was pretty cool.
However, the red x is there for every record on the form now. I only
want to see it for a certain record that I check. Thanks for your help.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Regarding: > There is not control source for it if that makes a
difference. <

If there is no control source for it, what you are getting is the
expected behavior.
Only if Check117 is bound to a field in the table will you get the
individual records showing their check box value. That's how Access
knows that record #12 should be Yes, and record #13 should be No.

If Check117 is bound to the table, the LabelLargeCheck will show the
individual values also.

Make Check117 Not Visible. The code, if written correctly (see below)
will show the large check box in the label, depending upon whether the
Check Box field is aYes or No. But Check117 must be bound to a table,
otherwise all records will be the same.

You have also incorrectly coded the LabelLargeCheck event.
Here is what it should look like, using Check117 as the name of the
checkbox.

Private Sub LabelLargeCheck_Click()
[Check117] = Not ([Check117])
If [Check117] = True Then
LabelLargeCheck.Caption = Chr(251)
Else
LabelLargeCheck.Caption = " " ' a space
End If
End Sub
==========

Hope this helps.
--
Fred
Please reply only to this newsgroup.
I do not respond to personal e-mail.
Nov 12 '05 #6
Fred,

I put a control source on Check117 like you said. The problem I have
now is that when I put the control source of the check box (which is
check117) to a field on the underlying table of the form it makes that
particular field a -1 (clearing impt. data from that field).

How can I bound it to the table and prevent it from clearing impt. data
when I check the box (check117)? I know you said to make the check box
hidden but I cant check the box if it is hidden. I was thinking I could
add a field to the table and just hide it but maybe there is some trick
to it.

thanks Fred!


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #7
Tony Johnson wrote:
Fred,

I put a control source on Check117 like you said. The problem I have
now is that when I put the control source of the check box (which is
check117) to a field on the underlying table of the form it makes that
particular field a -1 (clearing impt. data from that field).

How can I bound it to the table and prevent it from clearing impt. data
when I check the box (check117)? I know you said to make the check box
hidden but I cant check the box if it is hidden. I was thinking I could
add a field to the table and just hide it but maybe there is some trick
to it.

thanks Fred!


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


When responding to a post, please include the relevant portion of the
post so that the reader doesn't have to search out the previous message.

By definition , a check box field has a value of either -1 or 0.
-1 is the value of True, Yes, or On. The Check box shows a check.
0 is the value of False, No, or Off. The Check box is empty.

You can use those values to print something else. For instance to print
certain text in a a report"

=IIf([Check117] = -1, "I did it!!","He did it!!")

will print "I did it!!" if the value of the check box is -1.

The Check box need not be visible because clicking on the large label
(because of this line in it's code:

Private Sub LabelLargeCheck_Click()
[Check117] = Not ([Check117])

changes the value of the check box from 0 to -1, or from -1 to 0.

Perhaps you should not be using a Check box at all if you are trying to
store different data.

--
Fred
Please reply only to this newsgroup.
I do not respond to personal e-mail.
Nov 12 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by vishal | last post: by
3 posts views Thread by Rex_chaos | last post: by
5 posts views Thread by Steve Wylie | last post: by
2 posts views Thread by jimi_xyz | last post: by
4 posts views Thread by John Smith | last post: by
3 posts views Thread by puja | last post: by
reply views Thread by Saiars | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.