Subject Re: [IBO] Problem again with OnDataChange
Author TeamIBO
> Thing was working fine in D5, IBO 3.6.x.

> The CustNo is hooked up to a TIB_LookupCombo on another form.

> This event is firing but the Field parameter is coming thru as nil.

> Could we get a fix on this asap please?? (or is there something new
> or something I'm missing??)

Hi Kevin,

The datachange event has always issued some events with Field as nil,
when the change impacts the entire row and not just a single column.
It depends on exactly what you expect to be happening here, but I
would have suggested something like...

If (qryDirHdr.State in [dssEdit, dssInsert]) and
((Field = nil) or (Field.FieldName = 'CUSTNO')) then

So that you pickup all changes, whether related to a single field or
the entire row. And so you avoid doing the assignments when qryDirHdr
is not in edit or insert.

One additional comment...

perhaps your assignments:
qryDirHdr.FieldByName('CUSTTERMS').AsString :=

could be replaced by appropriate KeyDescLinks entries in the qryCustLU
table (assuming it is actually hooked up to the qryDirHdr query).

Geoff Worboys - TeamIBO
Telesis Computing