出现这个报错 :Unable to invoke Code Completion due to errors in source codeunit main;interfaceuses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Grids, DBGrids, StdCtrls, ComCtrls;type
  TForm1 = class(TForm)
    PageControl1: TPageControl;
    TabSheet1: TTabSheet;
    TabSheet2: TTabSheet;
    TabSheet3: TTabSheet;
    TabSheet4: TTabSheet;
    TabSheet5: TTabSheet;
    C_Lab_deptN: TLabel;
    C_Lab_courseL: TLabel;
    C_Lab_courseN: TLabel;
    C_ComB_deptN: TComboBox;
    C_ComB_courseL: TComboBox;
    C_ComB_courseN: TComboBox;
    Button1: TButton;
    DBGrid1: TDBGrid;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;var
  Form1: TForm1;implementation
uses DM_cx;
{$R *.dfm}procedure TForm1.FormCreate(Sender: TObject);
begin
    //with adoq_cx_course do
      begin
        ADOC_Cx_course.  //当我“.”时就出现上面的错误end;end.

解决方案 »

  1.   

    ADOC_Cx_course该构建没有在TForm1   =   class(TForm) 后 private前出现,也就是窗体中没有这个构建,你引用了一个不存在的对象当然报错。
      

  2.   

    DM_cx单元中是不是没有这个adoq_cx_course,或者是加上这个DM_cx.adoq_cx_course试试
      

  3.   

    DM_cx这个直接放到最上面的uses
      

  4.   

    回复无坚不摧:ADOC_Cx_course该构建没有在TForm1       =       class(TForm)   后   private前出现“  我没修改过啊,怎么会出现这种情况的啊,怎么解决啊!