Try it with ADefault specified ...

HTH

function InputBox(const ACaption, APrompt, ADefault: string): string;

Description

Call InputBox to bring up an input dialog box ready for the user to enter a
string in its edit box. The ACaption parameter is the caption of the dialog box,
the APrompt parameter is the text that prompts the user to enter input in the
edit box, and the ADefault parameter is the string that appears in the edit box
when the dialog box first appears.

If the user chooses the Cancel button, InputBox returns the default string. If
the user chooses the OK button, InputBox returns the string in the edit box.

Use the InputBox function when there is a default value that should be used when
the user chooses the Cancel button (or presses Esc) to exit the dialog. If the
application needs to know whether the user chooses OK or Cancel, use the
InputQuery function instead.

Regards
Paul McKenzie

=========================
Paul McKenzie
Jetbet II Developer
=========================
[EMAIL PROTECTED]
Ph: (04) 576-6822

T.A.B. National Office
106-110 Jackson Street
Petone
New Zealand



____________________Reply Separator____________________
Subject:  Re: [DUG]:  help with search string
Author:   [EMAIL PROTECTED]
Date:          02/10/2001 13:53



     On Tue, 2 Oct 2001 13:41:24 +1200, you wrote:

     >Can you post the original problem again?
     >
     >Thanks
     >
     >Stacey
     >
     ok Stacey below os the code i am getting the error unterminated string
     in the line which i will mark for you the error is at compile time and
     is starting to really piss me off.

     procedure TForm1.BitBtn7Click(Sender: TObject);
        var
         SearchText : string;
         tmp : address;
       begin
       //error on this line// SearchText := inputbox( 'Name Search', 'Enter
     the name your looking
     for');
       if (SearchText <> '') and Find( SearchText ) then
         begin
         read( AddressFile, tmp );
         eName.text  := tmp.Name;
         eStreetAddress.text := tmp.StreetAddress;
         ecity.text:=tmp.city;
     emobile.text:=tmp.mobile;
     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/(See
attached file: att1.eml)

att1.eml

Reply via email to