主题:我在这个unit中已经引用了下面这个unit,可是运行的时候老是提示错误。请教各位是哪里错了啊?
查询窗口:
unit Find_F;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, Findresult_F;
type
TFind_Form = class(TForm)
RadioButton1: TRadioButton;
RadioButton3: TRadioButton;
Label1: TLabel;
Label2: TLabel;
Edit_pet_name: TEdit;
Edit_species: TEdit;
BitBtn_OK: TBitBtn;
BitBtn2: TBitBtn;
procedure BitBtn_OKClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Find_Form: TFind_Form;
implementation
{$R *.dfm}
procedure TFind_Form.BitBtn_OKClick(Sender: TObject);
begin
[color=FF0000] Findresult_Form.ShowModal;[/color] /////我在这个unit中已经引用了下面这个unit,可是运行到这里的时候老是提示错误如附件所示。请教各位是哪里错了啊?
end;
end.
查询结果窗口:
unit Findresult_F;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, ADODB, Grids, DBGrids;
type
TFindresult_Form = class(TForm)
DBGrid1: TDBGrid;
ADOQuery1: TADOQuery;
DataSource1: TDataSource;
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Findresult_Form: TFindresult_Form;
implementation
uses Mypet_M;
{$R *.dfm}
procedure TFindresult_Form.FormCreate(Sender: TObject);
begin
ADOQuery1.Open;
end;
procedure TFindresult_Form.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
ADOQuery1.Close;
end;
end.
unit Find_F;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, Findresult_F;
type
TFind_Form = class(TForm)
RadioButton1: TRadioButton;
RadioButton3: TRadioButton;
Label1: TLabel;
Label2: TLabel;
Edit_pet_name: TEdit;
Edit_species: TEdit;
BitBtn_OK: TBitBtn;
BitBtn2: TBitBtn;
procedure BitBtn_OKClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Find_Form: TFind_Form;
implementation
{$R *.dfm}
procedure TFind_Form.BitBtn_OKClick(Sender: TObject);
begin
[color=FF0000] Findresult_Form.ShowModal;[/color] /////我在这个unit中已经引用了下面这个unit,可是运行到这里的时候老是提示错误如附件所示。请教各位是哪里错了啊?
end;
end.
查询结果窗口:
unit Findresult_F;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, ADODB, Grids, DBGrids;
type
TFindresult_Form = class(TForm)
DBGrid1: TDBGrid;
ADOQuery1: TADOQuery;
DataSource1: TDataSource;
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Findresult_Form: TFindresult_Form;
implementation
uses Mypet_M;
{$R *.dfm}
procedure TFindresult_Form.FormCreate(Sender: TObject);
begin
ADOQuery1.Open;
end;
procedure TFindresult_Form.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
ADOQuery1.Close;
end;
end.