Checkbox bigger workaround question

P

Puppet_Sock

Heya

The by-now-famous Fred G. workaround for making checkboxes
bigger is to make a text label, set its font to Wingdings,
then add the appropriate code to deal with clicking on the
label to switch it from the letter o to char(255), and in
the Current event of the form to get it started correctly.
Then set the original checkbox to be not visible.

My question about this is: If you have this on a form and
you click the label, then hit the Esc button, it removes
edits to the original check box, but *not* to the label.
How do I code for that event? How do I account for the
cancel changes action of the user?
Also how do I deal with Refresh and Requery?
Socks
 
F

fredg

Heya

The by-now-famous Fred G. workaround for making checkboxes
bigger is to make a text label, set its font to Wingdings,
then add the appropriate code to deal with clicking on the
label to switch it from the letter o to char(255), and in
the Current event of the form to get it started correctly.
Then set the original checkbox to be not visible.

My question about this is: If you have this on a form and
you click the label, then hit the Esc button, it removes
edits to the original check box, but *not* to the label.
How do I code for that event? How do I account for the
cancel changes action of the user?
Also how do I deal with Refresh and Requery?
Socks

I have several different versions out so I can only give you a generic
assist.
You can code the form's Undo Event:
If [CheckField] = False Then
LabelName.Caption = Chr(252)
Else
LabelName.Caption = ""
End If

Change the [CheckField] name to whatever the actual check box field
is.
Adjust the False to True if needed.
Change the chr() values to which ever you are using
 
A

Allen Browne

Fred, do you need to check the *OldValue* of CheckField in Form_Undo, so
that the right thing gets restored regardless of whether the yes/no field
was changed or not?

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

fredg said:
Heya

The by-now-famous Fred G. workaround for making checkboxes
bigger is to make a text label, set its font to Wingdings,
then add the appropriate code to deal with clicking on the
label to switch it from the letter o to char(255), and in
the Current event of the form to get it started correctly.
Then set the original checkbox to be not visible.

My question about this is: If you have this on a form and
you click the label, then hit the Esc button, it removes
edits to the original check box, but *not* to the label.
How do I code for that event? How do I account for the
cancel changes action of the user?
Also how do I deal with Refresh and Requery?
Socks

I have several different versions out so I can only give you a generic
assist.
You can code the form's Undo Event:
If [CheckField] = False Then
LabelName.Caption = Chr(252)
Else
LabelName.Caption = ""
End If

Change the [CheckField] name to whatever the actual check box field
is.
Adjust the False to True if needed.
Change the chr() values to which ever you are using
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top