Subject TIB_Checkbox
Author Don Gollahon
I'm trying to implement a checkbox based on another field. If the field has
a value then I want a checkbox to be True. Otherwise I want it to show
false.

The problem with my code is the onclick of the tib_checkbox doesn't ever get
called.

I'm using a calculated field for the checkbox field:

Monitored char(1)

Default for the field is 'N'.

The OnCalculateField code is:

if ARow.ByName('Monitor_name').asstring = '' then
ARow.ByName('Monitored').asstring := 'N'
else
ARow.ByName('Monitored').asstring := 'Y';

My onClick is:

if not (ib_cbMonitored.DataSource.Dataset.State in [dssEdit, dssInsert])
then
exit;
if ib_cbMonitored.Checked then
ib_cbMonitored.DataSource.Dataset.FieldByName('Monitor_name').asstring
:=
IB_ConnectionBar1.IB_Connection.Username
else
ib_cbMonitored.DataSource.Dataset.FieldByName ('Monitor_name').asstring
:= '';


Thanks.

--

Don Gollahon
(dlgllhn@...)