Subject | Re: [IBO] TIB_LookupCombo: Indicating search is fail in incremental searching mode. |
---|---|
Author | TeamIBO |
Post date | 2002-01-28T13:55:42Z |
> In OnNotInList event I show a message if not found and after that ISo you want to prevent the user exiting when they have not selected
> want back to my TIB_LookupCombo component.
anything.
The following code works on the sample that you sent me...
procedure TfrmSalesOrder.grdSOItemsCellLoseFocus(Sender: TObject; ACol,
ARow: Integer);
begin
if (ACol = 1) and (lcProduct.Text = '') then
begin
lcProduct.SetFocus;
Abort;
end;
end;
Note: while working on that code I realised that some earlier code I
sent to you needs adjustment...
procedure TfrmSalesOrder.qrProduct_LUAfterScroll(IB_Dataset: TIB_Dataset);
begin
if not(qrProduct_LU.Eof or qrProduct_LU.Bof) then // << ADD THIS
if qrSOItems.State in [dssEdit,dssInsert] then
qrSOItems.FieldByName('SOITEMS_PRICE').AsCurrency :=
qrProduct_LU.FieldByName('SELLING_PRICE').AsCurrency;
end;
If you dont add the line indicated above then you cannot clear the
selection by pressing the delete key.
hth
--
Geoff Worboys - TeamIBO
Telesis Computing