On Thu, 4 Oct 2001 10:15:29 +1200, you wrote: >What is eread? I assume this should be read. >What is eName? a TEdit on the form? >...
when i drop the e prefix as name, etc is a part of a record so i put addres.name.text etc and i still get e error. > 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/ ... 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/