I would suggest using Google groups to find Access books and/or web pages,
which can describe things in more details than is really possible here. Here
is a quick overview of how to put code to work.
If you right click a control (text box, combo box, label, line, check box,
etc.) and click Properties you will see what is called the property sheet.
Property sheet are also available for froms, details sections, headers, and
footers. To see the property sheet for the form, right click anywhere that
isn't part of the form itself (such as title bar, rulers, etc.) and click
Properties. Or click, then View > Properties; or double click a control to
open its property sheet. For the form's property sheet you can double click
the small box at the upper left; it usually has a small dark square inside it
when you open the form in design view (or change to design view). Remember,
all of this has to happen in design view. There are exceptions, but forget
that for now.
The middle tab on the property sheet is Event. Click on that tab, and you
will see a list including such things as On Current, Before Update, On Click,
and so forth. The list will be different depending on whether you are
looking at properties for a form, label, text box, etc. To add a Click event
to a label, open the label's property sheet to the Event tab and click next
to On Click. A down arrow and another square with three dots will appear on
the right. Click the three dots, then double click Code Builder. A new
window will open. Assuming your label is named lblLargeCheck you will see
something like this:
Private Sub lblLargeCheck_Click()
End Sub
Click between those lines and add the code provided. Fred's code already
contains Private Sub and End Sub lines, so just make sure those lines appear
only once.
Similarly, add code to the On Current event for the form, as described in
Fred's post. When he says "code the On Click event" he means to do what I
have described.
This is a quick overview to get you through the current situation, but
Events are powerful and versatile tools that need some time and study.
Browse the newsgroups, find some web sites, get a book, and learn how to put
them to work.
Tripacer said:
EXCELLENT! Thanks fredg!
Now, if you couldn't tell, I'm new at this. It looks like there's a LOT of
great and useful things you can do by using these snippets of code that
everyone posts - such as you have here. However...I have no idea what to do
with this code or where to put it. It sounds like your answer is just what
I'm looking for but I have no idea how to use it. Any tips on some good
resources? Thanks again!
Tripacer
fredg said:
I have created a form that uses 12 pt. fonts but the check boxes are very
small. Is it possible to increase the size of the checkboxes?
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.