> Hi, I am trying to show a value in a field when a check box is checked,[color=blue]
> example: if the box is checked, value of $ 15.00 appears. What is the
> function or expression for this?[/color]
If this value is to be displayed in a calculated control (the value isn't going
to be stored), then you can set the control's "control source" to:
=IIF(Me.chkBox.Value, 15, 0)
If you want to assign the value to a control bound to a field in the form's
recordsource you could do it this way:
'****
If Me.chkBox.Value Then
Me.MyControlName.Value = 15
Else
Me.MyControlName.Value = 0 'Or "Null", if more appropriate
End If
'****
In either of the examples above, set the control's "Format" property to
"Currency".
I generally discourage the use of hard-coded values, so, if this value is likely
to change you should store it in a table and then you can look it up using the
"DLookup()" function or a recordset when needed.
--
Bruce M. Thompson
bthmpson@mvps.org (See the Access FAQ at
http://www.mvps.org/access)[color=blue][color=green]
>> NO Email Please. Keep all communications[/color][/color]
within the newsgroups so that all might benefit.<<