Wayne's suggestion is the way to do it, but you need to do a little work:
1. Add the real checkbox, bound to the Boolean field in the table, to the
form and set its Visible property to false.
2. Add a text box sized to mimic a check box and set its FontName property
to Wingdings and its ControlSource property to:
=IIf([chkMyBooleanField],Chr(252),"")
where chkMyBooleanField is the name of the hidden real check box.
3. Use condtional formatting to set the colours of the text box as required
on the basis of Expresssion Is [chkMyBooleanField].
4. Add a button over the text box and set its Transparent property to True,
and for its Click event procedure use the following code:
Me!chkMyBooleanField = Not Me!chkMyBooleanField
When the user clicks the pseudo check box text box they will actually click
the button, which will set the value of the hidden real check box, and hence
the Boolean column it is bound to. The expression used as the text box's
ControlSource property will show it checked or unchecked and the conditional
formatting will change its colours.
PCW magazine did publish a form of mine showing how this is done, along with
other formats for pseudo check boxes, but I don't imagine its on their site
now. If you want a copy mail me at:
kenwsheridan<at>yahoo<dot>co<dot>uk
Ken Sheridan
Stafford, England
CW said: