Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DDGrid Search problem

Status
Not open for further replies.

MLNorton

Programmer
Nov 15, 2009
134
US
I am adding a form to an existing program. The Form contains a DBGrid and a Grid search capability. In this program I have several DBGrids with search capabilities. I use the identical procedure code for all.
Here is my code:

procedure TForm_NewVeteran.Edit_SearchChange(Sender: TObject);
var
FieldVal: string;
FieldName: string;
Lo: TLocateOptions;
begin
With Form_Main do
begin
Lo := [];
Include(Lo,loPartialKey);
Include(Lo,loCaseInsensitive);
With Form_Main.ADOQuery1 do
begin
FieldName := 'LastName';
FieldVal := Edit_Search.Text;
If ((Locate(FieldName, FieldVal,Lo)) = false) and
(length(Edit_Search.Text) > 0)
then
begin
MessageDlg('The requested record is not in the dataset.',mtWarning,
[mbOK], 0);
Edit_Search.Text := '';
end;
end;
end;
FieldName := '';
Edit_Search.SetFocus;
end;

In this new Form I get the following error:

[DCC Error] NewVeteran.pas(92): E2003 Undeclared identifier: 'TLocateOptions'

What is going on and what is the solution?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top