Help: Form will not close when expected

I am building an application which queries an ACCESS 2.0 database.  If
the number of records returned is zero, I want to display a message then
close the original form once message acknowledged.  Below is the return
when is run when the form is activated.  The message appears indicating
that no records were retrieved but the form does not close afterwards.

Please respond to one of the following email addresses:

rbev...@trojan.neta.com
p21...@email.mot.com

Thanks for any help
=== Section of Code ====
procedure TForm_Add_MCO.Activate(Sender: TObject);
var
  InputString: string;
  ClickedOK: Boolean;
  ErrorFlag: Boolean;
  NC_File: string;
  Assembly: string;
  Version: integer;
  NC_Version: string;
  NumRecords: longint;
begin
  InputString := '';
  ErrorFlag := False;
  InputQuery('Data Entry', 'Enter NC FILE # to examine: ', InputString);
  if InputString <> '' then
  begin
  try
     with Query_Retrieve do
     begin
        Close;
        Prepare;
        Params[0].AsString := InputString;
        Open;
        NumRecords := Query_Retrieve.RecordCount;
        if NumRecords <> 0 then
        begin
          {*** code to populate fields on form ***}
        end
        else
        begin
           MessageBeep( 0 );
           MessageDlg('Selected NC File does not exist.', mtInformation,
             [mbOk], 0);
        end;
     end;
  finally
     Query_Retrieve.Close;
  end;
end;
if NumRecords = LongInt(0) then
begin
   MessageBeep(0);
   Close;
end;
end;