What is eread? I assume this should be read. What is eName? a TEdit on the form? ...
Dave. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 02, 2001 3:41 PM To: Multiple recipients of list delphi Subject: [DUG]: first error fixed, now for the second ok i managed to fix the first error i must have had a ctrl character in there but the rest i get record, object required. the function and the procedure are listed function Find( const searchText : string ) : boolean; var tmp : address; begin result := false; Seek(AddressFile,0); while (not result) and ( not EOF( AddressFile)) do begin read( addressFile,tmp); {if you want case-sensitivity you could use result := SearchText = tmp.Name} result := AnsiCompareText( SearchText, tmp.Name) = 0; {if you've found the record, then seek backwards so it can be read} if result then Seek(AddressFile,FilePos(AddressFile)-1); end; end; procedure TForm1.BitBtn7Click(Sender: TObject); var SearchText : string; tmp : address; begin SearchText:=InputBox('Name Search','Enter The Name Your Looking For',''); if (SearchText <> '') and Find( SearchText ) then begin //error eread( AddressFile, tmp ); //error eName.text := tmp.Name; //error eStreetAddress.text := tmp.StreetAddress; //error ecity.text:=tmp.city; //error ephone.text:=tmp.phone; //error emobile.text:=tmp.mobile; / /error eemail.text:=tmp.email; end; end; ... Brendon Toogood E-Mail [EMAIL PROTECTED] --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/