title: Error: "Undeclared identifier" using a form from another Unit - Delphi 2010
body: <p>I'm trying to use a Form from another Unit, but the code isn't recognizing the other Unit. </p>
  
  <p>Example:</p>
  
  <pre><code>     unit uImpressao;
  
      interface
  
      uses
        Windows, Messages, SysUtils, Variants, Classes, Graphics,
        Controls, Forms, Dialogs, uniGUITypes, uniGUIAbstractClasses,
        uniGUIClasses, uniGUIForm, uniGUIBaseClasses, uniPanel, uniURLFrame;
  
      type
        TfImpressao = class(TUniForm)
          ufRelatorio: TUniURLFrame;
          UniImage1: TUniImage;
          procedure UniImage1Click(Sender: TObject);
        private
          { Private declarations }
        public
          { Public declarations }
        end;
  
      implementation
  
      {$R *.dfm}
  
      uses
        MainModule, Main, uBancoHoras;
  
  procedure TfImpressao.UniImage1Click(Sender: TObject);
  begin
    fBh.iTeste.Visible := false;
  end;
  
  end.
  </code></pre>
  
  <hr>
  
  <pre><code>    unit uBancoHoras;
  
  interface
  
  uses
    Windows, Messages, SysUtils, Variants, Classes, Graphics,
    Controls, Forms, Dialogs, uniGUITypes, uniGUIAbstractClasses,
    uniGUIClasses, uniGUIForm, uniLabel, pngimage, uniImage, uniGUIBaseClasses,
    uniPanel, uniPageControl, uniButton, uniBitBtn, uniSpeedButton, uniCanvas,
    uniDateTimePicker, uniMemo, uniMultiItem, uniComboBox, uniEdit, uniBasicGrid,
    uniDBGrid, uniDBMemo, uniRadioButton, uniDBText, uniRadioGroup, frxClass,
    frxDBSet;
  
  type
    TfBH = class(TUniForm)
      iTeste : TUniImage;
    private
      { Private declarations }
    public
      { Public declarations }
  
    end;
  
  var
    url: string;
  
  function fBH: TfBH;
  
  implementation
  
  {$R *.dfm}
  
  uses
    MainModule, Main, uImpressao;
  
  function fBH: TfBH;
  begin
    Result := TfBH(MM.GetFormInstance(TfBH));
  end;
  
  procedure TfBH.iTesteClick(Sender: TObject);
  begin
      fImpressao.ShowModal;
  end;
  </code></pre>
  
  <hr>
  
  <p>When I try using the uImpressao unit in uBancohoras unit, returns the error "Undeclared identifier 'fImpressao'".
  Using uBancoHoras unit in the uImpressao unit, works fine.</p>
  
  <p>I don't understand why this error is happening with one unit, but not with the other.</p>
  
  <p>I hope you can help me!</p>